Skip to content

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    You can search Free Spire.XLS dll and use the following code to easily export data table value to Excel:
    1. Workbook book = new Workbook();  
    2. Worksheet sheet = book.Worksheets[0];  
    3. sheet.InsertDataTable(datatable, true, 1, 1);  
    4. book.SaveToFile("insertTableToExcel.xlsx",ExcelVersion.Version2013);  
     
    0