Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting HTML to Excel? [closed]

Tags:

How to convert HTML template to Excel file

like image 534
Saicharan S M Avatar asked Mar 05 '12 12:03

Saicharan S M


People also ask

How do I convert HTML back to Excel?

To convert an . html file, open it using Excel (File - Open) and then save it as a . xlsx file from Excel (File - Save as).

Can an HTML file be opened in Excel?

If you have Microsoft Excel 97 or later, you can open HTML documents in Excel in order to create charts or do further analyses.

Can HTML be exported to Excel?

Any HTML table that you have created can be converted into an Excel Spreadsheet by using jQuery and it is compatible with all browsers.

How do I convert HTML to text in Excel?

1. Select the cells you will convert all html to texts, and press the Ctrl + F keys to open the Find and Replace dialog box. 2. In the Find and Replace dialog box, go to the Replace tab, enter <*> into the Find what box, keep the Replace with box empty, and click the Replace All button.


2 Answers

So long as Excel can open the file, the functionality to change the format of the opened file is built in.

To convert an .html file, open it using Excel (File - Open) and then save it as a .xlsx file from Excel (File - Save as).

To do it using VBA, the code would look like this:

Sub Open_HTML_Save_XLSX()

    Workbooks.Open Filename:="C:\Temp\Example.html"
    ActiveWorkbook.SaveAs Filename:= _
        "C:\Temp\Example.xlsx", FileFormat:= _
        xlOpenXMLWorkbook

End Sub
like image 81
Robert Mearns Avatar answered Sep 22 '22 00:09

Robert Mearns


We copy/paste html pages from our ERP to Excel using "paste special.. as html/unicode" and it works quite well with tables.

like image 39
gamov Avatar answered Sep 22 '22 00:09

gamov