Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dde
Message
From
17/01/2003 11:02:44
 
 
To
17/01/2003 09:51:36
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Dde
Miscellaneous
Thread ID:
00741841
Message ID:
00742901
Views:
22
Curtis, I realize that you have a problem and whether DDE is "dead" or not doesnt help right now :) But can you perhaps combine your DDE code with automation code? In other words, use CreateObject to create an instance of Excel. Open the xls file required. Continue to use DDE to extract your data. And then you can again use automation to close Excel. The steps would be something like:
oExcel = CreateObject("Excel.Application") && Create Excel Object
oBook  = oExcel.Workbooks.Open("MyExcelFile.xls")   && Open your File
oExcel.Visible=.T.  && Show Excel to let user do editing if required

...Your current DDE code to extract data here

oBook.Save()   && Save user changes if necessary
oBook.Close()  && Close the XLS file
oExcel.Quit    && Quit Excel Application
Hilmar Zonneveld has written a good article showing the basic steps to control Excel like this. Its available at:

http://www.levelextreme.com/Magazine/September2002/Page45.asp


>I agree that DDE may be dead but it works great for what I am doing. I can load 1000 records 4cells from excel per record in less that 7 seconds and that is coming from 4 different spreadsheets. I looked at the automation but still dont understand it enough to use it.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform