HTML table to XLSX — rows rebuild, layout does not
You want the vendor's price page sortable and summable, so it needs to be a workbook. The rebuild carries cell text into cells and leaves the page's layout behind — which means the file arrives structurally correct but presentationally empty, and a few repairs are usually needed before the sheet is useful.
Cell formatting, colours, column widths and merged ranges are dropped; only stored values survive.
Processed on your device. Files aren’t sent anywhere.
Rows rebuild, layout does not
Each markup row becomes a spreadsheet row; each cell becomes a cell. Everything that described the page's shape is not part of a workbook's cell grid in the same way.
| Markup | Cell result | Follow-up |
|---|---|---|
| A cell displaying $12 | $12 as text | strip symbols, convert to numbers |
| Header labelled Region spanning three columns | one cell | expand the header by hand |
| Cell labelled Total spanning two rows | one cell in the first row | copy the value down |
| A cell displaying an encoded ampersand | & | nothing |
| A cell containing a link labelled Buy | Buy | destination is gone |
Repairing the shape in the workbook
The repairs are small and mechanical, and they belong in the workbook rather than in the converter.
- Expand a merged header so every column has a label.
- Copy a rowspan value down to the rows it covered.
- Delete caption or footnote rows that are not data.
- Convert text columns to numbers before sorting or summing.
- Add the header row if the page had none.
Numbers that arrive as text
Cells are written from the text of the markup, so a price with a currency symbol or a thousands separator arrives as characters. Sorting such a column gives a lexicographic order, and summing it gives nothing until the symbols are removed and the cells are converted to numbers.
After opening the workbook, test a calculation on a small range whose expected result you know. Seeing digits in a cell does not prove that a spreadsheet treats that cell as a number. Displayed text and numeric cell types are different things. Convert the intended columns deliberately in your spreadsheet software, taking care to leave product codes and other identifiers as text.
Questions
Does a merged header become merged cells?
Why can't the price column be summed?
Do multiple tables become multiple sheets?
Is the page styling preserved?
One sheet named after the file
Sheet mode decides how many sheets the workbook has: First sheet writes the first table, All sheets writes every table found in the document, in order. Sheet names are cleaned of characters a spreadsheet cannot use and shortened to the format's limit. The downloaded file keeps the source file's name.
Checking the rebuilt sheet
Verify the shape before you rely on the numbers.
- Convert the .html file and download the workbook.
- Read the header row and confirm every column has a label.
- Check rows that a span shifted.
- Convert numeric columns to numbers.
- Sort and sum to confirm the column behaves as data.