To export an HTML table to Excel, copy the rendered table into a worksheet and save it as an .xlsx file, or use Excel's Data > From Web workflow for a repeatable import. The important distinction is the direction: an HTML-to-Excel export starts with a web table and ends with an Excel workbook.
Choose the method based on what you have. A copied table is usually fastest for a single extraction, Excel's web import is better for a known page that exposes structured table data, and a parser-based workflow gives developers more control over headers and repeated exports.

Pick the right HTML-to-Excel route
Before copying anything, determine whether the source is a visible table on a page, a public URL that Excel can query, or an HTML fragment in your own project. The most reliable result comes from importing the table itself rather than selecting unrelated headings, filters, navigation elements, or promotional content around it.
| Method | Input | Best for | Result and limitation |
|---|---|---|---|
| Copy and paste | A rendered table in a browser | One-off exports and JavaScript-driven pages | Produces worksheet data that can be saved as .xlsx; presentation styles may not transfer consistently. |
| Excel From Web | A URL containing a standard table | Repeatable imports and refreshable data | Loads a selected table into Excel; a table created only by client-side JavaScript may not be available to the importer. |
| HTML parser workflow | HTML markup you can inspect | Automation and controlled development workflows | Converts table rows into structured data before creating the workbook; the parser and header mapping must be checked. |
For a quick manual conversion, start with the copy-and-paste method. For scheduled or repeatable collection, test Excel's web importer against the exact page. If the table is dynamically generated or embedded inside a larger application, use a parser that operates on the rendered table or use the site's own data-export feature when one is available.
Export an HTML table into Excel by copying it
This method works with a table you can see in the browser. It is particularly useful when JavaScript creates the table after the page loads, because the browser has already rendered the rows before you copy them.
- Open the page in your browser. Wait for the table to finish loading. Interact with any filters or selectors that control which rows appear, and confirm that all required columns are visible.
- Select only the table. Drag from the upper-left cell of the header to the lower-right cell of the final visible row. Exclude page headings, totals outside the table, buttons, and explanatory text unless they belong in the export.
- Copy the selection. Use your browser's Copy command. Excel receives the copied table as tab-separated cell content in most cases.
- Create a blank Excel workbook. Select cell A1 and paste the copied content. Use Paste Special if you need to control how Excel places the values.
- Check the header and column boundaries. Confirm that each source column landed in one Excel column and that the first row contains the labels you want to retain.
- Review representative rows. Check empty cells, dates, numbers, long text, and values that begin with special characters. Remove any blank rows or columns introduced from surrounding page content.
- Save an Excel workbook. Choose File > Save As, select Excel Workbook (*.xlsx), enter a filename, and save the file.
This route gives you a normal Excel workbook rather than a text file with an .xlsx extension. It also lets you correct any awkward conversions before delivery. Keep the original HTML or URL as the source of record if the table may change later.
Use Excel's From Web workflow for a repeatable import
Excel's built-in web import is useful when a public page contains a conventional server-rendered table. Menu labels can vary slightly by Excel version, but the workflow generally begins under Data, Get Data, and From Web.
- Open Excel and start a new workbook. Select Data > Get Data > From Web. Some versions place From Web directly in the Data tab.
- Enter the page address. Paste the full URL into the dialog and confirm it. The URL must be accessible to Excel for the initial query and any later refresh.
- Choose the correct table in the Navigator. When the page loads, Excel lists the tables it recognizes. Select the intended table and preview its columns before loading it. Do not choose a similar table containing navigation labels or unrelated records.
- Choose how the data should be loaded. Use Load to Worksheet for a direct one-time import. Choose Load to Connection when you want to keep the query and refresh the data later.
- Load the query into Excel. For a connection-based import, choose the destination worksheet, apply any needed query changes, and close the load screen. For a direct worksheet load, review the table that appears.
- Validate the imported values. Confirm the header row, row count, column order, and a few representative records. Web imports may represent blanks differently from what the page visually shows.
- Save the result as .xlsx. Use File > Save As and choose Excel Workbook (*.xlsx).
For a workbook that should update, use Data > Refresh All after the initial import. Refresh depends on the source remaining reachable and may require credentials if the page is protected. Keep the query's load settings consistent with your intended refresh cycle.
A key limitation is that Excel's web importer may not see a table that exists only after client-side scripts run. If the Navigator does not contain the expected table, copy the fully rendered table instead or use a parser-based workflow against the rendered page.
Build a developer-controlled export from HTML markup
If you own the HTML or need repeatable automation, convert the table into structured data before opening it in Excel. This separates table extraction from workbook creation and makes the intermediate result easier to inspect.
- Isolate the target table. Remove surrounding navigation, scripts, styles, and unrelated markup. If the document contains several tables, make sure the table you want is the first one processed by your chosen converter.
- Extract rows as structured objects. The HTML Table to JSON Converter extracts text from the first HTML table and converts its rows into JSON objects with predictable header handling.
- Inspect the JSON. Confirm that the array contains one object per data row, that the intended header appears as a field name, and that nested or repeated values were handled as intended.
- Create the workbook from the JSON array. The JSON to Excel Converter turns a JSON array of objects into a local .xlsx workbook while preserving the first-seen field order.
- Download and open the .xlsx file. Check the worksheet against the original table, especially when the source contains empty cells, long descriptions, duplicate-looking labels, or more than one header level.
Automatic extraction is not a substitute for reviewing structure. Complex tables with nested tables, row spans, column spans, or deliberately blank header cells may require manual cleanup before the data reaches Excel.
Handle JavaScript, headers, and formatting carefully
First identify how the table gets into the page. A table present in the initial HTML response is more likely to work with Excel's From Web importer. A table assembled after JavaScript runs is usually easier to export by copying it after it appears. If automated browser-based extraction is necessary, obtain permission to collect the data and test against the exact page state you need.
Next, separate data from presentation. CSS colors, borders, alignment, and fonts do not automatically become a matching Excel design. If the Excel file is for analysis or data transfer, preserve the values and apply Excel formatting afterward. If visual fidelity is the main requirement, decide whether Excel is appropriate rather than assuming a spreadsheet can reproduce a web layout exactly.
Multi-row headers and merged cells deserve particular attention. A single header row usually produces the cleanest table. If the first row combines several labels, review the pasted result and either reshape the header in Excel or build separate fields in the structured-data workflow.
Links and calculated-looking values should also be reviewed. A visible label and its destination may be separate pieces of information, and a value copied from a web table may be plain text rather than a working Excel formula. Preserve both when needed, but do not treat a web link as equivalent to a formula.
Use the reverse converter only for Excel-to-HTML
If your actual source is an Excel worksheet and your destination is HTML, the Excel to HTML Table Converter supports that opposite workflow. It does not turn an existing HTML table into an .xlsx workbook, so it should not replace any of the HTML-to-Excel methods above.
Its supported process is to open one local .xlsx workbook, select a worksheet whose first row should become the table header, convert it to HTML, inspect the snippet, and then download or copy it. The browser produces visible HTML and an optional download, while the workbook remains in the browser tab. The source workbook is not edited, no account is required, and no copy is retained by the tool.
The output is a simple structural table. The selected first row becomes header cells inside thead, later rows become data cells inside tbody, and every cell value is HTML-escaped. Text resembling an image, script, event handler, or other markup therefore remains visible text instead of becoming an executable element. Formula cells use a stored value when the workbook provides one; the page does not recalculate formulas, run macros, follow links, or open external connections.
| Boundary | Supported requirement |
|---|---|
| Input file | One local .xlsx workbook no larger than 20 MB in a classic single-disk OOXML ZIP format. |
| Archive size | At most 2,000 ZIP entries and no more than 50 MB of declared expanded content. |
| Selected worksheet | At most 100,000 addressed cells. |
| Generated HTML | No more than 10 MiB. |
| Rejected files | Unsupported Zip64, multi-disk, damaged, encrypted, legacy .xls, and macro-enabled files stop with a clear error. |
Nothing is silently shortened into a misleading partial table. This reverse workflow 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. It produces a literal representation of stored values rather than a visual clone of Excel. Destination CSS and accessibility requirements must be reviewed separately because the tool intentionally generates only basic table markup.
Validate the Excel file before delivery
Before sending the exported workbook, open it and check the header, column count, first few rows, and final row. Look for shifted columns, duplicated labels, unwanted blank rows, and values that Excel interpreted differently from the page. Then save the workbook as .xlsx and reopen it once to confirm that the file opens normally.
- Header: Confirm the first row contains the labels your recipient expects.
- Structure: Confirm every row has the intended number of cells and no surrounding page content was copied.
- Values: Review representative text, numbers, dates, blanks, and long entries.
- Meaning: Confirm that important links, totals, and multi-level headers are represented clearly.
- File type: Use Save As and select Excel Workbook (*.xlsx), rather than renaming a CSV or text file.
For a one-time copy-and-paste export, the resulting workbook is the deliverable. For a web query or automated pipeline, retain the source URL or source markup and document when the Excel file was generated so recipients can distinguish current data from an older export.
For a deeper look, see Excel to JSON API Alternative for Local Data Handoffs.
For a deeper look, see How to View Excel Online in Dark Mode Without Upload.