Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting to Excel format
Message
From
24/04/2006 05:11:17
 
 
To
23/04/2006 22:20:04
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01115863
Message ID:
01115895
Views:
17
>In Visual FoxPro, I was able to do:
>
>
>COPY TO oapp.cHttpFat +"\"+lcFile TYPE XL5
>
>
>to export the current data into an Excel file. How would I be able to achieve the same from a dataset?


For a quick and dirty export you can create a string with values separated by tab and create file with an 'XLS' extension
lcXLS = lcXLS + value1 + chr(9) + value2 + chr(9) + value3 + crlf

Excel opens the file (no formatting just as VFP copy to .. type xls)


Another option is to create an excel file with formatting, colors, etc. and save as a web page. I then have to do some manual parsing to set things up to merge data. The end result is a page that shows up as a formatted excel spreadsheet for end users with excel, and as a normal web page for end users without excel.

Ken
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform