.NET converter
Export Html To Excel files XLS, XSLX

Html To Excel .NET

• HTML documents with CSS styles.
• Excel formats: Excel Spreadsheet XLSX, XLS, CSV.
• Doesn't require Microsoft Excel.
• 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 > Html to Excel Without Saving

Html To Excel .NET converter  

 

 

 
Learning Resources
 

 

 

 

 

News & Releases

April 05, 2016
Version 2.1 Update
Html To Excel .NET converter
December 23, 2015
Version 2.1 Update
Html To Excel .NET converter
February 12, 2015
Version 2.1 Update
Html To Excel .NET converter
May 02, 2013
Version 2.1 Update
Html To Excel .NET converter
December 12, 2012
Version 2.1 Update
Html To Excel .NET converter
August 11, 2012
Version 2.1 Update
Html To Excel .NET converter
June 07, 2012
Version 2.1 New Release!
Html To Excel .NET converter

Html to Excel without Saving on server

"My reporting service generates different reports in HTML format at the corporate website. We thought that it will be great if our customers can view the report in Excel format. But we don't want to save Excel reports on our server. How can it be done?"
Alan Kirk

After converting html to excel, the excel can be saved to memory stream instead of excel file. Use Response object to stream data to browser window. Note, there are different content types (mime) for XLS and XLSX formats.

  1. // Read the specified html file.
  2. HtmlDoc html = HtmlDoc.ReadHTML(@"Html_to_Excel.html");
  3.  
  4. // Convert Html table to Excel
  5. HtmlToExcel htmlexcel = new HtmlToExcel();
  6. ExcelWorkbook excel = htmlexcel.Convert(html);
  7.  
  8. // XLS
  9. // Save Excel Workbook (XLS) to MemoryStream
  10. byte[] bytes = excel.WriteXLS().ToArray();
  11.  
  12. // Show Excel (XLS) in Browser window without saving on disk
  13. Response.ContentType = "application/vnd.ms-excel";
  14. Response.BinaryWrite(bytes);
  15. Response.Flush(); Response.End();
  16.  
  17. // XLSX
  18. // Save Excel Workbook (XLSX) to MemoryStream
  19. byte[] bytes = excel.WriteXLSX().ToArray();
  20.  
  21. // Show Excel (XLSX) in Browser window without saving on disk
  22. Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
  23. Response.BinaryWrite(bytes);
  24. Response.Flush(); Response.End();
  25.