Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Querry to execel
Message
De
03/11/1997 13:30:45
 
 
À
03/11/1997 09:50:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00057966
Message ID:
00058015
Vues:
34
>>Id like the results of a select statement to end up in an
>>excel worksheet. Is there a programmatic wat to do this?
>>
>>TIA
>>Chris
>
>You SELECT ... Into Cursor tmp
>and then COPY TO tmp.xls TYPE XLS


You should experiment with a this with your data since sometimes you
get wierd stuff with some data types.

You may want to use "TYPE XL5" rather than "TYPE XLS" which makes a Excel version 5 file rather than a version 2 file.

You can also use "TYPE DELIMITED" to make a comma delimited file (CSV) that may make the data handling better (however you lose the column width and all cells
will be text).

Of course, you can also automatically start Excel and load any of the three
formats.

Finally you can use OLE to create the spreadsheet and load the cell
values and perform any formatting. Be careful, however, since MS changed the properties for Excel 97. OLE is also somewhat slow for large datasets.
__________________________________________________
Mesa Vista Software (david@mesa-vista.com)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform