The fastest way to convert HTML table data to Excel is to copy the visible table from your browser, switch to a worksheet, and paste with Ctrl+V; Excel treats each row and cell as a separate entry and immediately lets you clean up the result. For larger or messier tables, saving the source page as a standalone .htm or .html file and using Excel's built-in data import wizard produces a cleaner transfer with fewer manual fixes, because the wizard walks through the document's tables and lets you confirm which one to import. Power Query handles recurring imports and lets you reshape, filter, or split columns before they reach a sheet, which matters whenever the source HTML has merged cells, multi-row headers, hidden rows, or stray whitespace. This guide walks through each method in the order most developers reach for them, then introduces a companion tool that solves the reverse workflow when you need to publish Excel data back as an escaped HTML snippet for a static page, a CMS draft, or a developer handoff.

Choose the Right Method for Your Table
Three practical approaches cover almost every real-world HTML-to-Excel task, and choosing between them depends on the table's size, cleanliness, and how often you will repeat the import. Copy and paste wins for one-off small tables that already look reasonable in the browser. Save-as-HTML plus the import wizard wins for medium tables where the source markup is reasonably clean. Power Query wins for messy tables, recurring imports, or anything you need to reshape before it lands on a sheet.
The table below summarizes the trade-offs. None of the three methods preserve the original page styling; they all deliver a structural copy of the underlying values.
| Method | Best for | Formatting preserved | Reusable | Setup effort |
|---|---|---|---|---|
| Copy and paste | Small, one-off tables | Most layout hints only | No | None |
| Save as HTML, then import | Medium clean tables | Structure only | No | Low |
| Power Query From Web | Complex or recurring imports | Raw structure, reshaped in PQ | Yes | Medium |
Copy and Paste: The Quickest Path for Small Tables
For a table you can see end to end on the screen, the clipboard is often the fastest bridge to Excel. The source does not even need to be a file: it can be a rendered page, a PDF in the browser, or an HTML snippet pasted into a developer tool. Excel's paste engine reads tab characters and table semantics well enough to recreate rows and columns without manual alignment.
To do it cleanly:
- Select the table in the browser, including its header row, and copy with Ctrl+C (or Cmd+C on macOS).
- Open Excel and click the destination cell.
- Use Ctrl+V to paste; if Excel prompts about the paste format, choose Match Destination Formatting or Keep Source Formatting depending on whether you want your workbook styles or the page styles to win.
- Scan for any cells that arrived as a single block; multi-line text sometimes collapses unless you widen the column first.
The main downside is that this approach does not scale. Tables larger than a few dozen rows, or pages with several side-by-side tables, often produce merged or truncated results that need manual cleanup. It is also a one-shot operation; there is no query to refresh next time the page changes.
Save the Page and Import as a Web Table in Excel
Saving the source page as a local .htm or .html file before importing gives Excel more to work with, because the wizard can read the document's table structure directly instead of inferring it from clipboard text. This approach shines when the page is large, has a clean <table> skeleton, and only needs to be imported once or twice.
- In the browser, choose File then Save Page As and pick Webpage, Complete or HTML Only as the format. Save the file to a folder you control.
- In Excel, open a blank workbook and go to the Data tab.
- Choose Get Data, then From File, then From HTML (in older Excel versions this is Get External Data, then From Web, and you point it at the local file).
- In the Navigator dialog, pick the specific table you want. If the page has several tables, each one appears as a separate entry; preview each before confirming.
- Click Load to drop the table onto a new sheet, or Transform Data to open Power Query and clean up columns before loading.
One quirk worth knowing: Excel treats each <table> element as its own import target, and tables nested inside other tables show up as their own entry rather than as part of the parent. If your source uses <div>-based layouts instead of real <table> markup, Excel may not find anything to import, and Power Query becomes the better choice.
Use Power Query for Messy or Repeated Imports
Power Query sits behind the Get Data menu and is the right tool whenever the source HTML has merged cells, multi-row headers, hidden rows, stray whitespace, or non-breaking spaces that confuse the simple paste. It also lets you save the import as a query so the same import can be refreshed next month without rebuilding it from scratch.
- Open Excel, then Data, then Get Data, then From Other Sources, then From Web (or From File, then From HTML if you saved the page locally).
- Enter the page URL, or browse to the local .htm file, and click OK.
- In the Navigator, pick the table you want. Click Transform Data instead of Load when the preview shows merged headers, extra columns, or unwanted rows.
- In the Power Query editor, use Remove Top Rows, Remove Columns, Split Column, and Trim to clean up the shape. Promote Headers turns the first row into column names.
- Click Close and Load to send the cleaned table to a sheet. The query stays in the Queries and Connections pane and can be refreshed later with a single click.
For developers, the appeal is repeatability: a query saved once can be reused as part of a larger pipeline, and the M code behind it can be edited directly when a page's structure shifts.
The Reverse Direction: Convert Excel Data to an Escaped HTML Snippet
After you have moved HTML data into Excel and shaped it the way your team needs, the next step is often the reverse: publishing the cleaned values as a static HTML snippet for a documentation page, an internal wiki, a CMS draft, or a developer handoff. Pasting raw worksheet cells straight into HTML is risky because any cell that looks like markup will be parsed as markup, and a single stray <script> tag in source data can break the destination page.
The Excel to HTML Table Converter handles that reverse workflow by reading stored worksheet values from a local .xlsx workbook and producing an HTML snippet where every cell is HTML-escaped before it enters the string. Angle brackets, ampersands, quotation marks, and apostrophes become entities, so a cell containing text that resembles an image, a script, or an event handler stays visible text in the output instead of becoming an executable element. Formulas are not recalculated; only stored values are read.
To run the conversion:
- Choose one local .xlsx workbook that is no larger than 20 MB and has a classic single-disk OOXML structure.
- Select the worksheet whose first row should become the table header.
- Convert to HTML, inspect the escaped snippet in the preview, then download it as a file or copy it to the clipboard.
The output is deliberately narrower than an Excel rendering. It does not reproduce fonts, colors, borders, column widths, merged-cell semantics, charts, pictures, comments, filters, named ranges, print settings, data validation, formulas, or workbook protection. If a sheet's formatting carries meaning, keep the workbook or rebuild the layout with a purpose-built publishing tool. The converter produces structural table markup only; destination CSS and accessibility decisions belong to the consuming page. For a deeper walkthrough of the same tool, see how to convert an Excel table to HTML code.
Limits to Watch When Converting Between HTML and Excel
Every direction of this conversion loses something. The browser-to-Excel path drops fonts, colors, borders, and cell-level formatting; only the structural shape of rows and columns survives. Spans and merged cells may collapse into a single combined value, and decorative <colgroup> settings are silently ignored. Power Query preserves more of the raw structure than copy and paste does, but it still reads stored values rather than rendered styling.
The Excel-to-HTML path is narrower still. A snippet is a literal representation of stored cell values, not a visual clone of the workbook, so anything that lives in the workbook's formatting layer rather than its cell values will not appear in the output. Browser safety limits apply before parsing: the input must be a .xlsx file no larger than 20 MB with a classic single-disk OOXML ZIP directory, at most 2,000 ZIP entries, no more than 50 MB of declared expanded content, and a worksheet capped at 100,000 addressed cells. Generated HTML may not exceed 10 MiB. Unsupported Zip64, multi-disk, damaged, encrypted, legacy .xls, or macro-enabled files stop with a clear error rather than producing a misleading partial table.
The original workbook should stay the source of record in either direction. Treat every HTML export and every Excel import as a snapshot of stored values; if the workbook is updated later, re-run the conversion rather than trusting the cached output.
Related reading: How to Convert Excel to JSON File for ITR Filing.