Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Streaming data into Excel
Message
From
21/12/2006 14:59:36
 
 
To
21/12/2006 14:55:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01179463
Message ID:
01179654
Views:
11
>>>>>Hi All
>>>>>
>>>>>Years ago I used DDE to return data into Excel. A user would type in a formula in Excel which would then connect to my app running in the background using DDE. My app would then send back the data requested. But more importantly when my app got new data in it would send it back to Excel again and again.
>>>>>
>>>>>What would be the best approach to doing this today keeping in mind (a) unsophisticated users who do not want to do things very much differently today and (b) that my app must be aware of all Excel cell's that have requested some data so that it can re-send new data as it comes into my app.
>>>>
>>>>Jos,
>>>>"Running in the background" sounds like automation + eventhandler()/bindevent() model. VFP can automate the excel, plus it could respond to events in Excel (or other OLE app).
>>>>You can say add toolbar and buttons, when they are clicked respond with VFP code etc.
>>>>Or you can create addin. I couldn't succeed creating an addin from VFP directly but using a VB wrapper you could do that too.
>>>>
>>>>Yet another alternative might be to host Excel, in a web browser control that is a on VFP form.
>>>>Cetin
>>>
>>>Thanks Cetin. The users will not do this. It would require too much change for them. They load and work within Excel and would find it strange if we asked them to load our program and work in Excel within it instead. Lots of potential issues there!
>>
>>Could you use GETOBJECT() to open an already running Excel?
>>
>>
oExcel = GETOBJECT(,"excel.application")
>
>Hi Fred. No I need the user to initiate the request from Excel. It looks like DDE is still the best way to do this. Thanks.

You still can. You can instantiate in VFP your Excel object, tie into the Excel events usng BINDEVENT() or via the interface. That way, your VFP app can respond to Excel happenings.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform