Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP to Excel
Message
From
28/02/2002 10:11:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
28/02/2002 10:09:58
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00626407
Message ID:
00626409
Views:
16
>Sorry for the silly question, but could anyone help me with basic programatic access to Excel from VFP. i.e open Excel book and change some cells values.
>
>Thanks for that
>
>Jonathan

Use the following example as a starting point.
oExcel = CreateObject("Excel.Application")
oExcel.Visible = 1   && for debugging
oExcel.Workbooks.Add()
oSheet = oExcel.ActiveSheet
oSheet.Cells(1,1) = "Hello!"
Then, save a macro, do anything you want, and do some small adaptations from the generated macro code, to adapt to VFP.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform