Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an Excel spreadsheet
Message
 
To
20/05/2004 18:06:35
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00905836
Message ID:
00906000
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
>Hi there,
>
>what's the easiest way to create an Excel spreadsheet with the results of a query? Is there any way else other than taking a DataSet and using Office automation to create the spreadsheet?
>
>TIA

I've used only Office automation since it works with most versions of Excel. I don't know if you know this, but you can create a 2 dimensional VB.NET array with the content of a DataTable and copy the array to an Excel spreasheet in a single call to Excel (rather than going cell by cell) http://support.microsoft.com/default.aspx?scid=kb;en-us;306022 Formating still needs to be done separately, but you can use ranges for that.

Using XML is an option if you can guarantee that users will have the latest and greatest version of Excel since previous versions (including Office 2000) have limited (or non) support for XML files.
Hector Correa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform