Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Streaming data into Excel
Message
From
21/12/2006 10:29:08
 
 
To
21/12/2006 10:21:21
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:
01179573
Views:
7
>>>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.
>>
>>The best way is to use Excel VBA:
>>
>>oMyexcel=createobject('Excel.Application')
>>oMyexcel.visible=.t.
>>oMyexcel.workbooks.add
>>
>>and then you use all MS-Excel VBA methods/properties to move Fox data to Excel cells.
>>Btw, you are not required to set Visible=.T. so all processing will happen on background.
>
>Thanks Ed. I use this we want to send data to Excel from our app. But I am looking a system where the end-user can within Excel initiate a request for data from our application. Previously we used a DDE server to listen for requests.

VFP program can have a timer that will check contents of particular Excel cell(s) or variable, so when Excel users will change it manually it will trigger your code to move same data from VFP to Excel. The only thing needed is to 'start' Excel from VFP, so you have an object to interact.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform