>Can someone tell me how I can create an Excel formatted file in C#. Right now, I am using the Streamwriter class to write out a comma delimited file one column at a time. But I would like to also have the option to write out to Excel format.
The goal is to change your dataset into xml. Then, create a generic xsl file that is capable of creating a workbook, a worksheet and have the code to handle each row based on the field type such as string, datetime, integer and boolean so you can apply some business logic in there. Then, you can do a XslCompiledTransform.Transform() to obtain your Excel xml file.