c# export to xlsx
Then, just download the CreateExcelFile.cs file (via the  Browse code  link in CodeProject's left-hand panel), and add it to your application. And that's it. Regardless of if your data is stored in a, DataTable, or DataSet, you can export it to a real Office 2007 Excel .xlsx file using that one line of code.And because it is created using the OpenXML library, you can run this code on machines which don't have Excel installed.o today, I'm going to walkthrough how to use my C# Export to Excel class which you can add to your C# WinForms / WPF / ASP.NET application, using one line of code.