Convert HTML Table to Excel Online
Turn an HTML table into an XLSX workbook. The markup is read in your browser and never uploaded.
Drop a CSV or Excel file here
CSV · XLSX · XLS · XLSM · XLSB
Ready to download as a binary file.
How to convert an HTML table to Excel
Three steps from orders.html to an XLSX file.
1. Paste the HTML
Paste markup that contains a <table>, or drop an .html file.
2. Check it in the grid
Strip currency symbols and thousands separators if you want to calculate with the totals in Excel.
3. Download XLSX
Click Download XLSX. The workbook (data.xlsx) is built from the grid as it is at that moment, in your browser.
Example: HTML in, Excel out
A page with two tables, a non-breaking space ( ) and a European-formatted amount.
<h2>Open orders</h2>
<table>
<tr><th>Order</th><th>Customer</th><th>Total</th></tr>
<tr><td>A-881</td><td>Kraus GmbH</td><td>€1.240,00</td></tr>
<tr><td>A-884</td><td>Dupont SA</td><td>€310,50</td></tr>
</table>
<h2>Closed orders</h2>
<table>
<tr><th>Order</th><th>Customer</th><th>Total</th></tr>
<tr><td>A-870</td><td>Rossi Srl</td><td>€95,00</td></tr>
</table>| A | B | C | |
|---|---|---|---|
| 1 | Order | Customer | Total |
| 2 | A-881 | Kraus GmbH | €1.240,00 |
| 3 | A-884 | Dupont SA | €310,50 |
Only the first <table> (open orders) is used. The in Kraus GmbH becomes a non-breaking space, which looks like a space but won't match "Kraus GmbH" in a lookup, and €1.240,00 comes in as text.
What changes between HTML and Excel
Built from the grid
The XLSX is made from the grid, row for row: the header row (Order, Customer, Total) is row 1 and the first data row is row 2. The "First row as header" checkbox affects only text outputs, not the workbook.
Edits included
Anything you change in the grid before downloading (a fixed typo, a deleted column, a renamed header) is what ends up in the file.
First row is the header
The first row (Order, Customer and Total) becomes the header, whether its cells are <th> or <td>. colspan and rowspan would not be expanded, so check spanned rows in the grid.
When to convert HTML to Excel
- Saving a table from a website or an intranet report as a workbook.
- Sending HTML report data to someone who wants Excel.
HTML to Excel in JavaScript
TabularJS reads HTML: every <table> becomes a worksheet. Writing the .xlsx is the part TabularJS leaves to a writer library.
import tabularjs from 'tabularjs';
// The first row of the table becomes the column titles
const { worksheets } = await tabularjs('orders.html', { tableIndex: 0 });
const ENT = { nbsp: '\u00a0' }; // Node.js keeps entities as written
const decode = (v) => String(v ?? '').replace(/&(\w+);/g, (m, e) => ENT[e] ?? m);
const header = worksheets[0].columns.map((col) => decode(col.title));
const rows = worksheets[0].data.map((row) => row.map(decode));
// TabularJS reads spreadsheets but does not write them.
// [header, ...rows] is the 2D array an XLSX writer takes; this page
// builds the file with Jspreadsheet and its @jspreadsheet/render extension.
console.log([header, ...rows]);TabularJS differs from this page in two ways: it returns every <table> as a worksheet, and it turns colspan into mergeCells. In Node.js it leaves entities such as & as written, hence the decode step.
Frequently asked questions
Are the table's colours and fonts kept?
No. Only cell text is read, so the page's CSS (colours, fonts, widths) doesn't reach the workbook.
Can all tables from the page go into one workbook?
Not on this page. In code, TabularJS returns every <table> as its own worksheet, which you can then write into one workbook.
Are links and images kept?
No. Only the visible text of each cell is read, so a link keeps its text and loses its URL, and images are dropped.
Will the file open in older versions of Excel?
It is an .xlsx file, which Excel 2007 and every later version open natively, as do Excel for Mac and Excel on the web.
Does orders.html get uploaded when I convert it to Excel?
No. The markup is read in your browser and never uploaded.