>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