HTML Table to Excel
Paste HTML and get an Excel workbook, one sheet per table. Handles colspan, rowspan and messy markup. Nothing is uploaded.
Related tools
All Document tools →This tool runs entirely in your browser. Nothing you enter is sent to our servers, so there is nothing for us to store or see.
About the HTML Table to Excel
Paste HTML and get an Excel workbook back, one sheet per table. Everything runs inside this page on your own device, so nothing you paste is uploaded.
Merged cells are where this conversion usually goes wrong, and it goes wrong invisibly. A cell with colspan="3" occupies three columns; emit one and every later value in that row shifts left and lands under the wrong heading. A cell with rowspan="2" occupies a slot in the next row too; ignore that and the following row shifts left instead. Either way the result is a full, plausible-looking sheet with the values in the wrong places, which nobody checks. Both are tracked properly here: spans are padded out, and a vertically merged value is carried down into the rows it covers so every row stays self-describing.
Real markup is also messy, and that is expected rather than a problem. Cells without closing tags, rows closed by the next row, unquoted attributes, <br> instead of <br/> — all of it is read the way a browser would. Whitespace is collapsed as a browser collapses it, so a table indented across twenty lines does not arrive full of blank lines, while a genuine <br> survives as a line break inside the cell. Script and style blocks are skipped entirely, so a table copied out of a full page does not pick up its JavaScript.
A table nested inside a cell becomes its own sheet rather than having its rows spliced into the table containing it. Values are written as text unless you ask for numbers to be detected, which keeps product codes and long identifiers intact.
How to use the HTML Table to Excel
-
Get the HTML
Use View Source or your browser's inspector, copy the table markup, and paste it in. You can also drop a saved .html file onto the box.
-
Check what was found
The line underneath says how many tables and rows were detected. If that does not match the page, the markup pasted was probably incomplete.
-
Choose your options
Leave the header option on to bold each table's first row. Turn on number detection if you need to sum or chart the columns.
-
Download the workbook
Press Download Excel. Each table becomes its own sheet, in the order they appeared.
Frequently asked questions
Is my data uploaded anywhere?
No. The markup is read and the workbook is built entirely inside your browser, and nothing is sent to a server. You can disconnect from the internet once the page has loaded and it will keep working exactly as before.
Are merged cells handled correctly?
Yes, and it is the main reason to use this rather than a copy and paste. A colspan is padded out across the columns it covers, and a rowspan value is carried down into the rows it spans. Without both, a row shifts left and the values end up under the wrong headings — in a sheet that looks perfectly fine.
Does it cope with badly formed HTML?
Yes. Cells with no closing tag, rows closed by the next row, unquoted attributes and bare <br> tags are all read the way a browser reads them. Real markup copied off a page is rarely well-formed, so being strict about it would make the tool useless for its main purpose.
What happens to line breaks and indentation?
Whitespace is collapsed exactly as a browser collapses it, so a table indented across twenty lines does not arrive with blank lines in every cell. A genuine <br> is kept as a line break inside the cell, because that is a break the reader can actually see.
What about a table inside a table?
A nested table becomes its own sheet, straight after the one containing it. Its rows are not spliced into the outer table — which is what happens if cells are read as descendants instead of direct children, and it silently gives the outer table rows that belong to something else.
Will product codes keep their leading zeros?
Yes. Values are written as text unless you switch number detection on, and even then only values that convert back to identical text become numbers. So 00714 stays 00714 rather than becoming 714, and long identifiers are not rounded into scientific notation.