Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Export data to Excel
Message
 
 
To
10/05/2001 07:24:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00504835
Message ID:
00505668
Views:
26
>Hi Mark,
>Fortunately there are better ways :)
>The less the VBA calling the better the performance.
>1)The fastest I know is to save to a fox2x table or CSV or delimited with tab and open that file in excel.
>2)Save to a file delimited with tab, _cliptext=FileToStr(Saved), paste to special position in excel
>3)From Excel create an ODBC connection (QueryTables) to a database table or free table, or import text file (again QueryTables). This one is about 50-60% slower then paste method (and it's about 4-6 times slower than 1st) but provides a way to directly update,refresh data.
>
>Other options like datatoclip() and paste but be carefull with this one. Not only slower, adds an extra column and even 3rd parameter is specified as 3 doesn't always produce tab delimited format.
>
>1.1 secs was with option 1 :) Full code demonstrating getting 200K rows into excel with 2 different approaches was referenced at some branch (possibly in my first reply). If not I'll find it again.

I did see all those other options. I was just posting an example of what to expect with OLE automation. I thought you were talking about a faster way with automation that was not already mentioned.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform