How to copy a table from a website into Excel

There are five ways to do this, and which one you should use depends on one question: can Excel see the table by itself, or does it only exist after the page has run its JavaScript? Everything below follows from that.

1. Select the table and paste it

The obvious one, and for a small static table it is fine. Drag across the table, copy, then in Excel use Paste Special rather than a plain paste:

A plain Ctrl+V drags the page's fonts, colours and links across with it, and in a large table that is slow enough to notice.

Where it breaks:

2. Excel's own web import (Power Query)

Excel can fetch a page and pull the tables out of it. In Excel for Windows: Data, Get Data, From Other Sources, From Web, paste the URL, then pick a table in the Navigator pane and click Load. The query stays attached to the sheet, so Data, Refresh All pulls the current numbers again later.

This is the best option when it works, because it is repeatable.

Where it breaks:

3. Google Sheets IMPORTHTML

The same idea, one formula:

=IMPORTHTML("https://example.com/page", "table", 1)

The last argument is which table on the page you want, counting from 1. Use "list" instead of "table" for <ul> and <ol> content.

Where it breaks: exactly the same two places as Power Query. Public URLs only, server-rendered markup only. On top of that the result is cached, so a page that changes often can go stale, and a page that blocks Google's fetcher gives you #N/A.

4. A browser extension

An extension reads the table out of the page you are looking at, after the JavaScript has run and while you are logged in. That is the whole reason to use one, and it is the case where methods 2 and 3 cannot help.

That is what GridPick does. Click the toolbar icon, it lists the tables it can see, you pick one and copy it to the clipboard or save it as CSV, Excel, JSON or Markdown. The free version has no row limit, it expands merged cells into a proper rectangular grid, and it reads div-based grids as well as real <table> markup.

Two things worth checking before you install any table extension:

5. Three lines of Python

If you would rather script it and the page is public:

import pandas as pd

tables = pd.read_html("https://example.com/page")
tables[0].to_excel("out.xlsx", index=False)

read_html returns every table it found, so tables[0] is usually not the one you want; print len(tables) and look. Same limitation again: it fetches the HTML, so JavaScript-rendered grids are not there. For those you need a real browser, which means Playwright or Selenium, and at that point you are writing a scraper rather than copying a table.

Which one to use

SituationUse
Small table, one timeCopy and Paste Special as text
Public page, and you will want it again next monthPower Query or IMPORTHTML
Behind a login, or drawn by JavaScriptA browser extension
You need it on a schedule, unattendedPython or the site's own API

Four problems that come up whatever you use

Numbers that will not add up. Excel stores $1,234.50 as text. Strip the currency symbol and the thousands separator before you export, or fix it afterwards with Data, Text to Columns.

Leading zeros. Format the column as Text before pasting, or import the CSV through Power Query and set the column type to Text there.

Accented and Chinese characters turning into mojibake. A CSV without a byte order mark opens in Excel as the system code page. If your exporter has a UTF-8 with BOM option, use it.

A table that says 2,431 rows but exports 50. That is virtualisation, and it is worth understanding because no tool can work around it silently. See why your table export only has the rows you can see.

GridPick does this for you. It reads real tables and div-based grids, expands merged cells, warns you when a grid is only half loaded, and exports to Excel, CSV, JSON or Markdown. The free version has no row limit; Pro is a one-time payment.

Add to Chrome · What it is

Other guides