Hello to All,
I'm doing my first experimentation with OLE and up to now it's not a success :-(
I tough I first try with basic command I foud in VFP help but even those don't seems to work for me. Here's what I found in help and tried:
First trial:
"For example, to create a Microsoft Excel worksheet (which supports Automation), you can use the following syntax:
x = CREATEOBJECT('Excel.Sheet')
When this code is run, Microsoft Excel is started (if not already running), and a new worksheet is created."
This couldn't be simplier right? but when I tried it, Excell is not started. No error, nothing, I even check type("x") which return "O" so the object is created!
Second trial:
So I found also this in vpf help which I also tried without success.
oleApp = GETOBJECT(, "Excel.Application")
Third trial:
I got this code from a UT user sometime last week. This works, Excell is open with the good spreedsheet.
objExcel= CREATEOBJECT("Excel.Application")
lcFile = "C:\Temp\Stock\Info.xls"
objBook = objExcel.WorkBooks.Open(lcFile)
objExcel.Visible = .t.
Althrough this code works, I understand only part of it, where can I found information on "Excell" properties or method like .WorkBooks.Open()? I suppose that other interresting method exist, where or how can I see them?
One thing I'm trying to accheive is to open Excell only if it's not running, otherwise, I would like to open the spreedsheet only.
BTW: I'm using VFP 6.0, and Ecxell 97.
Note: I applogize for such a long question, If somebody feels like ansewring only part of it, feel free.
TIA
Diane Robitaille eng.