Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export data to Excel
Message
 
 
À
10/05/2001 07:24:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00504835
Message ID:
00505668
Vues:
27
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform