Tables & data

Copy a table from a website into Excel or Sheets

Get a table from a web page into Excel or Google Sheets with its columns intact: plain copy and paste, IMPORTHTML, and what to do with tables that won’t copy.

Title card: Copy a table from a website into Excel or Sheets

Most tables on web pages are real HTML tables, and they copy into a spreadsheet better than you might expect. The trouble starts with tables that only look like tables, and with data you want to keep up to date. Try these in order, from the quickest to the most stubborn case.

Quick answer

Look for a Download or Export link first. Otherwise, drag from the first header cell to the last cell, press ⌘C, and paste into Excel, Numbers or Google Sheets: real HTML tables keep their columns. In Google Sheets, =IMPORTHTML("url", "table", 1) pulls a table in and refreshes it. Tables drawn by scripts or images need to be captured from the screen.

Check for a download first

Before you copy anything, look around the table for Download, Export, CSV or a small download icon. Statistics sites, sports reference sites, banks and most admin dashboards offer one. An export gives you exact values with no formatting to strip, and it often includes columns the page hides.

If there’s no export, it’s time to copy.

Real HTML tables: select and paste

A browser copies a table as HTML as well as plain text, and spreadsheets rebuild the rows and columns from the HTML. So the simple way works more often than not:

  1. In Safari, Chrome or Firefox, start dragging inside the first header cell.
  2. Drag to the last cell you want and press ⌘C.
  3. Click a cell in Excel, Numbers or Google Sheets and press ⌘V.

Start the drag inside the first cell rather than in the text above it, or the selection tends to grab half the page. Links, bold text and background colours come along with the cells. Clear them with Edit → Clear → Formats in Excel, or paste with Edit → Paste and Match Style in Numbers and ⌘⇧V in Google Sheets.

Even real tables can paste with problems. Numbers sometimes arrive as text because the site used non-breaking spaces or an unusual minus sign. Footnote markers stick to figures, and header cells that span columns shift the row below. Compare the row count and a few values with the page before you move on.

Google Sheets: IMPORTHTML

When you want the table to stay current, let Google Sheets fetch it. The syntax, from Google’s documentation:

=IMPORTHTML("https://example.com/prices", "table", 1)
  1. Copy the page’s address from the browser.
  2. In an empty cell, type the formula with the address in quotes.
  3. Use "table" for a table, or "list" for a bulleted or numbered list.
  4. Set the last number to the table’s position on the page, starting at 1. Not sure which one? Try 1, then 2, then 3.
Four steps to import a web table with IMPORTHTML

Google says its import functions recalculate every hour, so the sheet follows changes on the page. IMPORTHTML only reads HTML tables and lists. Pages that build their tables with JavaScript after loading, or that need a login, often return an error or the wrong table.

To move the result into Excel, choose File → Download → Microsoft Excel (.xlsx) in Sheets. The download holds the values as they were at that moment, not the live formula.

Excel’s From Web connector

Excel for Windows has a web connector at Data → Get Data → From Other Sources → From Web: you paste an address, pick a table and load it. As of October 2026, Microsoft’s table of Power Query sources for Excel for Mac doesn’t include the web. It covers files such as workbooks, text and CSV, XML and JSON, plus folders, SharePoint, SQL Server and OData feeds. On a Mac, copy and paste or go through Google Sheets.

Tables that aren’t real tables

You can tell a fake table by how it behaves. Dragging selects the whole page or nothing at all, or the paste arrives as one value per row with no columns. There are three usual causes:

  • Built from layout boxes. Many data grids, especially sortable ones in web apps, are stacks of <div> elements styled to look like a table. Look for an export option in the grid’s own menu. If each value pastes on its own row, reshape the column with WRAPROWS, as shown in the PDF table guide.
  • Drawn on a canvas. Some dashboards and charting tools paint the table as pixels. There’s no text to select.
  • A picture. Tables in news articles and social posts are often screenshots.

Some sites also block selection or copying on purpose. Copying text from a website that won’t let you explains the options for those.

Capture what won’t copy

When the browser has nothing to give you, read the table from the screen.

In Unpixel

Press ⇧⌘2 and drag over the table as you see it. Unpixel recognizes the rows and columns on your Mac and puts cells on the clipboard, so the paste into Excel or Sheets keeps its columns. It doesn’t matter whether the page used a table, a stack of boxes, a canvas or an image.

Unpixel reads what’s on screen and can’t scroll the page for you. For a long table, capture it in screenfuls: paste the first part, scroll, capture the next rows without the header, and paste them underneath. For dashboards in particular, see copying numbers from a dashboard that won’t export.

Quick checklist

  • Export button? Use it: exact values, no cleanup.
  • Real HTML table? Drag from the first cell, copy, paste.
  • Needs to stay current? =IMPORTHTML(url, "table", n) in Google Sheets.
  • Styling came along? Clear formats, or paste values only.
  • Won’t select, or pastes as one column? Capture it from the screen.
  • Always: compare the row count and a few values with the page.

Frequently asked questions

Why did the pasted table bring the website’s fonts and colors with it?

The browser copies the table as HTML, styling included. In Excel, select the cells and choose Edit → Clear → Formats; in Numbers, paste with Edit → Paste and Match Style; in Google Sheets, paste with ⌘⇧V for values only.

Does IMPORTHTML update by itself?

Yes. Google says its import functions, IMPORTHTML included, recalculate every hour. If you need a fixed copy, select the cells, copy them and paste values only.

Can I copy a table from a page that needs a login?

IMPORTHTML can’t sign in, so it can’t read pages behind a login. Copy and paste from your own browser session instead, or capture the table from the screen.

Sources

  1. IMPORTHTML — Google Docs Editors Help support.google.com
  2. Set a spreadsheet’s location & calculation settings — Google Docs Editors Help support.google.com
  3. Download a copy of your file — Google Docs Editors Help support.google.com
  4. Keyboard shortcuts for Google Sheets — Google Docs Editors Help support.google.com
  5. Power Query data sources in Excel versions — Microsoft Support support.microsoft.com