locked
Convert html to Excel (xslx format) RRS feed

  • Question

  • Hello Everyone , 

    I am generating HTML files using XML and XSLT ,now i need to convert that generated HTML files to Excel (xlsx 2007/2010 format)

    how can I do that , any help will be appreciated? (i could not find third party component to help me. Office 2007 interop is not good either)

    thank you for help.

    Emzo.

     
    Tuesday, June 5, 2012 11:25 AM

Answers

  • Open with Workbooks.Open (C:\user\1.htm") and then Workbook.Saveas method.Excel will take care of the rest [formatting /styling etc]

    In VB window press F2 and then search for Workbook object ->Saveas method.

    • Proposed as answer by Quist Zhang Wednesday, June 6, 2012 2:24 AM
    • Marked as answer by Emzo Wednesday, June 6, 2012 7:28 AM
    Tuesday, June 5, 2012 2:04 PM
    Answerer

All replies

  • Open with Workbooks.Open (C:\user\1.htm") and then Workbook.Saveas method.Excel will take care of the rest [formatting /styling etc]

    In VB window press F2 and then search for Workbook object ->Saveas method.

    • Proposed as answer by Quist Zhang Wednesday, June 6, 2012 2:24 AM
    • Marked as answer by Emzo Wednesday, June 6, 2012 7:28 AM
    Tuesday, June 5, 2012 2:04 PM
    Answerer
  • Hi Emzo!

    I work at Expected Behavior, and we've developed a product called DocRaptor that converts HTML to PDF and Excel format. DocRaptor is easy to use, and creates Excel documents using HTTP POST requests. Here's a link to our Excel generation documentation:

    HTML to Excel with DocRaptor

    Monday, July 2, 2012 6:13 PM
  • As for as I know,  Aspose.cells and Spire.xls may be the your choices for managing excel within .NET. If you need, you may have a search.
    Tuesday, July 3, 2012 2:01 AM
  • Hello,

    You might want to look at Elerium HTML to Excel converter. It is not free but it can save you a lot of time.

    Example of using component:

    http://eleriumsoft.com/Excel_NET/HTML2Excel/Examples/Html_to_Excel_with_formatting.aspx

    Wednesday, February 27, 2013 9:44 AM
  • Hi, you can also try this .NET Excel component. It has a free and commercial version and a really nice API.

    Here is how you can convert HTML to Excel file in C#:

    ExcelFile.Load("Web File.html", LoadOptions.HtmlDefault).Save("Excel File.xlsx");
    Friday, July 12, 2013 8:14 AM
  • Old question, but if someone is still interested, there is a web application online that can convert any html code or html files to excel

    format online. The application allows to save it as both xlsx and xls.

    Html to Excel


    PDF tools online
    My Blog

    Sunday, February 9, 2014 5:28 PM
  • I just wonder do I have to have an Excel to be installed on the server in order to use this?

    Evgueni Souvorov

    Thursday, May 22, 2014 6:26 PM
  • We use HTML or the Hypertext markup Language for creation of WebPages by using a code in website. You can insert excel file to webpage by using programming or can take the snapshot of the excel file to insert it into the page. You can even take the help of a software that can help you to create table to in the websites.

    http://blog.softwaredownloadcentre.com/convert-html-table-excel-spreadsheet

    Tuesday, August 12, 2014 6:43 AM