Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting to Excel WITHOUT the first row being field nam
Message
From
08/09/2000 13:30:30
 
 
To
08/09/2000 08:53:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00413684
Message ID:
00414264
Views:
22
>>Thanks for the suggestions. I knew about the OLE Automation route, but I wanted to know if I was missing anything concerning the EXPORT TO command, or if there was another VFP method used for pushing data into Excel.
>>
>>Ben Holton
>
>Unless you are only pushing a small amount of data into Excel, using pure OLE automation is painfully slow.
>
>Instead, I have found it more efficient to:
>1) make a CSV file using COPY TO output.csv DELIMITED
>2) Start Excel using OLE automation
>3) Make Excel open the output.csv file via OLE
>4) Insert a row at the top and populate the cells with column titles via OLE
> (note this allows you to make better column titles then field names anyway)
>5) Perform other formatting such as fonts, alignments, borders, shading,
> sheet names, etc. via OLE
>6) Save the data as a Excel Workbook via OLE
>
>If you want some examples, please let me know,
>
>David

Check out _VFP.DataToClip() and Paste in Excel and tell me if you still think it's slow.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform