.NET component
Read / Write / Generate Excel XLSX XLS files

Excel Jetcell .NET

• File formats: Excel Spreadsheet XLSX, XLS, CSV.
• 100% managed .NET component.
• Doesn't require Microsoft Excel.
• High performance (~50000 records per second).
• Plain & Fair licensing.
• Royalty-Free. No extra cost for Server license.
• 6 Months: Free Support + Free Updates.
Evaluation Version
Download  |   Online Demo
Developer License - $175
Buy now  |   Price List

Skip Navigation LinksUser Experience > DataTable to Excel

Excel Jetcell .NET component



Learning Resources




FREE version

News & Releases

May 20, 2016
Version 3.1 Update
Excel Jetcell .NET component
March 24, 2016
Version 3.1 Update
Excel Jetcell .NET component
January 29, 2016
Version 3.1 Update
Excel Jetcell .NET component
October 14, 2015
Version 3.1 Update
Excel Jetcell .NET component
March 03, 2015
Version 3.1 Update
Excel Jetcell .NET component
May 15, 2013
Version 3.1 Update
Excel Jetcell .NET component
November 15, 2012
Version 3.1 Update
Excel Jetcell .NET component

DataTable to Excel

"How to convert DataTable to Excel and save excel file on hard disk? Thanks."
Valerie Jensen

Excel Reader .NET presents you an easy way to Export DataTable to Excel.
DataTable can be exported to Excel worksheet using ReadFromDataTable() function.

  1. //Create new DataTable.
  2. DataTable DTable = new DataTable();
  3.  
  4. DTable.Columns.Add("ID", typeof(int));
  5. DTable.Columns.Add("Product", typeof(string));
  6. DTable.Columns.Add("Price", typeof(float));
  7.  
  8. DTable.Rows.Add(new object[] { 1511, "Apples", 5.6 });
  9. DTable.Rows.Add(new object[] { 1512, "Bananas", 6.85 });
  10. DTable.Rows.Add(new object[] { 1513, "Pears", 5.3 });
  11. DTable.Rows.Add(new object[] { 1514, "Grapes", 6.95 });
  12. DTable.Rows.Add(new object[] { 1515, "Oranges", 4.0 });
  13. DTable.Rows.Add(new object[] { 1516, "Mango", 4.5 });
  14.  
  15.  
  16. //Create new workbook.
  17. ExcelWorkbook Wbook = new ExcelWorkbook();
  18.  
  19. //Adds new worksheet.
  20. Wbook.Worksheets.Add("Sheet1");
  21.  
  22. //Read data from DataTable.
  23. Wbook.Worksheets[0].ReadFromDataTable(DTable);
  24.  
  25. // XLS
  26. Wbook.WriteXLS(@"..\Excel_Export.xls");
  27.  
  28. // XLSX
  29. Wbook.WriteXLSX(@"..\Excel_Export.xlsx");