HTML to Excel: Get a Web Table Back Into a Spreadsheet | LlamaPress
LlamaPress
LlamaPress Blog

HTML to Excel: Get a Web Table Back Into a Spreadsheet

Four ways to convert HTML to Excel: paste the table, open the .htm file in Excel, use Data then From Web with Power Query, or an online converter. Which one to use, and when the round trip is the real problem.

Back to all articles
Kody Kendall

Written by

Kody Kendall

AI & Software Engineer | Creator of the Leonardo Coding Agent

Updated September 2026

You do not need an online HTML to Excel converter. Excel reads HTML tables itself in three ways. Copy the table on the page and paste it into a sheet. Open the .htm or .html file with File then Open. Or use Data then From Web, which is Power Query, when the table lives at a URL and you want to refresh it later. Use the third one if you do this more than once. Use an online converter only when the data is not confidential, because you are uploading it to a stranger's server.

In short

  • Paste is fastest for a one off table. Excel keeps the rows and columns and usually keeps the formatting too.
  • Data then From Web builds a refreshable query. Microsoft's Navigator "highlights each of the tables that are detected on that site".
  • Numbers arriving as text is the usual problem. Fix it once inside Power Query rather than every week by hand.
  • If you convert the same table every week, the copying is the problem, not the format.

Method 1: copy and paste the table

Select the table in your browser, copy it, click a cell in Excel and paste. Excel recognises the table structure and lays it out across rows and columns. Use Paste Special and pick text if you want the values without the web page's colours and fonts, which is usually cleaner.

This works for a table you need once. It does not work when the table is paginated across ten pages, and it goes wrong when the page uses layout divs instead of a real table element, because then there is no grid for Excel to find.

Method 2: open the HTML file in Excel

If somebody sent you a .htm or .html file, Excel can open it directly. In Excel, choose File then Open, set the file type filter to all files, and pick the .html file. Excel renders the tables into sheets.

Save the result as .xlsx straight away. If you keep working in the .html file, Excel keeps writing HTML, and you lose features that only exist in a real workbook.

Method 3: Data then From Web, using Power Query

This is the one worth learning. In Excel, open the Data ribbon and choose From Web. Paste the URL of the page. Excel fetches the page and opens the Power Query Navigator, where you pick which table you want. Microsoft describes the helpful part: the Web View tab "lets you see the entire contents of the web page, and highlights each of the tables that are detected on that site". You tick the one you want.

You then choose Load to drop it into a sheet, or Transform Data to clean it first. Cleaning it first is almost always right. In the Power Query editor you set each column's type, remove the junk rows, split a combined column and rename the headers. Those steps are saved with the query, so the next refresh applies them again automatically.

Two practical notes from Microsoft's documentation. If the page needs a login, pick the matching authentication method when Excel asks. And if the table is not a real HTML table, there is an Add table using examples button in the Navigator, where you type a couple of sample values and Excel works out the pattern.

Method 4: an online HTML to Excel converter

These work. The question is whether you should use one. You are uploading the table to somebody else's server, and the tables people most want to convert are the ones with prices, salaries, patient counts or customer names in them.

My rule is simple. If you would not email the file to a stranger, do not paste it into a free converter. Excel's own three methods above cover almost every case without the data leaving your machine. We take the same position on the forward direction: our Excel to HTML converter runs entirely in your browser so the workbook is never uploaded.

The four things that go wrong

Numbers arrive as text. This is the most common one. HTML has no types, so 1,240 arrives as a string with a comma in it. In Power Query, set the column type and the locale once. Pasting means fixing it by hand every time.

Dates flip. A table written as 03/04/2026 is March 4th to a US locale and April 3rd to most of the rest of the world. Set the column's locale explicitly in Power Query rather than trusting the default.

Merged header cells become blanks. A header that spans three columns lands in one cell and leaves two empty. Promote the correct row to headers and rename the blank columns.

The page is not a table. Many modern pages build grids from div elements. Excel finds nothing to import. Add table using examples is the way through, or ask whoever owns the system for a CSV export.

If you do this every week, the format is not the problem

Here is the pattern I see most. A system produces a report as a web page. Somebody copies it into Excel. They add three columns of their own. They send it around. Next week they do it again, and the three extra columns get re-typed.

That loop is expensive in a way that does not show up anywhere. Nobody bills for it. It also breaks quietly, because the manual re-typing is where the errors enter. Ray Panko's audits of real operational spreadsheets at the University of Hawaii found errors in at least 86% of those examined, and the ones built by repeated copying are exactly the kind he was looking at. His review is at arXiv 0802.3457.

The fix is to stop moving the data. Put the extra columns in the same place the report comes from, so the report already has them. That usually means a small application rather than a spreadsheet. Our Excel to app converter reads the workbook you have been maintaining and builds one, and this piece on overwriting in shared files covers the version of the problem where several people copy at once.

Frequently asked questions

What is the best HTM to Excel converter?

Excel itself. File then Open reads a .htm or .html file directly, and Data then From Web reads one from a URL and can refresh it. A third party converter adds an upload step and a privacy question without adding capability.

How do I use HTML in Excel?

Excel does not render HTML inside a cell. A cell holding markup shows the markup as text. To display formatted content you import the table so it becomes rows and columns, using one of the three methods above.

Can Excel refresh a web table automatically?

A Power Query connection can be refreshed, which re-reads the page and re-applies your cleaning steps. You can refresh it manually or set the workbook to refresh on open. It needs the page to stay at the same URL with the same table structure.

How do I go the other way, from Excel to HTML?

Use our free Excel to HTML converter for a clean table, convert the spreadsheet into a website if it should be live and searchable, or read why Excel's own Save As Web Page output is so large.

Does Power Query work in Excel for the web?

The full From Web experience described here is the desktop one. Microsoft's connector documentation lists prerequisites that are desktop components, so plan on using Excel for Windows or Mac for this.

Stop moving the same table every week

Upload the workbook you keep rebuilding. Our AI reads its tabs, columns and formulas and builds a working web app in about 60 seconds. Free to try.

Want us to build it for you? Contact us. Build sprints start at $2,000.

Sources: Microsoft, Power Query Web connector; R. Panko, Spreadsheet Errors: What We Know. What We Think We Can Do, arXiv 0802.3457. Both checked September 2026.