General information
Category:
Coding, syntax & commands
Title:
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
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only