Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel object
Message
 
To
02/03/1999 20:06:03
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00193390
Message ID:
00193426
Views:
13
>I know I can put an excel worksheet in a form in vfp, but how can I programmatically write data on it and access it´s ppeemm?. Is there any site wich publicates the excel worksheet object model?
>
>Tks in advance.

Some more VFP examples:

ox = CreateObject('excel.application')

ox.WorkBooks.Add()
ox.Visible = .t.
ox.ActiveWorkbook.Sheets.Add()
ox.Worksheets(1).Activate()

WITH ox.ActiveWorkbook.ActiveSheet
.Cells(1,1).Value = "My header"
.Cells(5,1).Value = 87
.Cells(5,4).Formula = "=B5*C5"
.Range("A1").Font.Size = 14
.Range("A1").Font.Bold = .T. && Title
.Rows(5).Font.Bold = .T.
.Columns(1).ColumnWidth = 30
ENDWITH

As Erik said, you can see the object model and properties in VBA Editor.
The easy way to get the a sample of use for some property reference - record a macro in Excel changing what you need visually, then Edit the recorded macro and see the code there.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform