Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting to Excel format
Message
De
24/04/2006 05:11:17
 
 
À
23/04/2006 22:20:04
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01115863
Message ID:
01115895
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform