Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querry to execel
Message
From
03/11/1997 13:30:45
 
 
To
03/11/1997 09:50:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00057966
Message ID:
00058015
Views:
30
>>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform