Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
I Finally Got FoxPro and Excel to Work Together!
Thanks to those who helped me load an Excel spreadsheet by calling Excel from FoxPro.
I wanted a straight-forward approach, without needing to utilize libraries or DDE. So, here's what I came up with:
-----
loTempSheet = GetObject('','excel.sheet')
oVar.ExcelApp = loTempSheet.Application
oVar.ExcelApp.Visible = .T.
oVar.ExcelApp.Workbooks.Open("c:\agetemp")
-----
"oVar" is a public variable I use for attaching variables as properties. This way, I can keep all public variables in one place, as an object.
The "agetemp" Excel file is created beforehand, after a selection is made on a grid.
Thanks a LOT!
Michael Reynolds
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement