Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dde
Message
De
17/01/2003 11:02:44
 
 
À
17/01/2003 09:51:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Dde
Divers
Thread ID:
00741841
Message ID:
00742901
Vues:
23
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform