Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE - Table to Excel file?
Message
From
10/09/1998 09:49:37
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00135005
Message ID:
00135012
Views:
15
Hi Perry ---

You could create an Excel sheet and write each row of data via OLE Automation if you really wanted to but it may be easier to use the COPY TO ...TYPE XLS combo to create the file then use automation to open it:

oExcel=CREATEOBJECT("Excel.Application")
oExcel.Workbooks.Open("NewXLSFile.XLS")

Now do whatever you would like to it. Look at VBA Help in Excel. VBA syntax for manipulating Excel stuff is not all that different than VFP.


>
>This is my 1st attempt at OLE Automation. I have a table from a x-tab query that I would like to transfer to an Excel worksheet for viewing, maybe even create a report with Text and company logo. I'm a little confused, do I use CREATEOBJECT('Excel.sheet') and export the data to the worksheet?? VFP help is a little vague in the matter.
>
>TIA
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform