Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel object model
Message
 
 
To
02/10/2001 18:07:57
Fausto Garcia
Independent Developer
Lima, Peru
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00563338
Message ID:
00563964
Views:
15
>Does anybody know where can I find the Microsoft Excel's object model? I need it to program passing data routines between VFP and Excel in order to invoke Excel's advanced calculation functions.

The VBAXL*.CHM files aren't always installed; they're only installed if you did a Custom install (as opposed to a Typical or Full install). You can install them from the install CD.

If you don't have access any more, you can find the object model in one of several Object Browsers. In Excel, you can find it by going to the VBA Editor (easiest way: press Shift-F11), then bring up the Object Browser (press F2).

You can also use VFP 7's Object Browser. Also, use early binding in VFP 7 to get Intellisense to help you out. For example:
LOCAL oExcel AS "Excel.Application"
oExcel = CREATEOBJECT("Excel.Application")
Now when you type
oExcel.
just after pressing the period, you'll get a list of possible PEMs that you can use, and a bit of help with them. This ONLY works in VFP 7.

What if you don't have VFP 7, and Excel's Object Browser still doesn't seem to make sense? Look in the MSDN Library, the other answers on this thread have given you a good start. The differences between 97, 2000, and XP are minimal, but there ARE differences.

Also look at the Solutions Samples with VFP, and there's code and help in the MS KB (try searching for "vfp excel automation" and see what you get).

Another resource is a book Tamar Granor and I wrote, called "Microsoft Office Automation with Visual FoxPro," available from www.hentzenwerke.com. This book springs from our real experience with Office Automation -- and Excel is extensively covered in the book. It also comes as a .CHM file, so you don't have to worry about shipping the book to Lima. Contact Hentzenwerke, and you'll be able to download the file shortly after they have your method of payment.

Hope this helps,

- della
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform