You can use ADO.NET to read from and write to Excel just like a database, or you can use automation to control an actual Excel instance and operate directly on the worksheets. Do a search on MSDN for "ADO.NET Excel" and "Automation Excel .NET" (both without quotes) for information and examples. If you already have data in a DataSet, I'd say ADO.NET would be your best bet (that's using an OleDbDataAdapter). I've never written data to Excel but I have read from it. I can't see that it would be much more complex, if at all.
Enter your message below
Sign in or Join us (it's free).