Skip to converter

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.

Drop files here or HTML, up to 12 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    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.

    MarkupCell resultFollow-up
    A cell displaying $12$12 as textstrip symbols, convert to numbers
    Header labelled Region spanning three columnsone cellexpand the header by hand
    Cell labelled Total spanning two rowsone cell in the first rowcopy the value down
    A cell displaying an encoded ampersand&nothing
    A cell containing a link labelled BuyBuydestination 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?
    No. A colspan or rowspan supplies one cell, and the covered positions are left empty. Repair the shape in the workbook.
    Why can't the price column be summed?
    Cells are written from markup text, so currency symbols and separators stay in the text. Strip them and convert the cells to numbers.
    Do multiple tables become multiple sheets?
    Only with All sheets. First sheet writes the first table only.
    Is the page styling preserved?
    No. Classes, inline styles and link destinations are not part of the workbook, which gets default presentation.

    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.

    1. Convert the .html file and download the workbook.
    2. Read the header row and confirm every column has a label.
    3. Check rows that a span shifted.
    4. Convert numeric columns to numbers.
    5. Sort and sum to confirm the column behaves as data.

    Share this converter

    More sharing options