How do I import a table from a website into Excel?

Give the Spreadsheets agent the page's address and say which table. It fetches the page, parses the table and writes a clean sheet with a frozen header and filters, and it fixes the source's shape when a row is split. The G20 members table below took 2.0 minutes.

A real run: the G20 members table

A run on our machine, 2 November 2026, on DeepSeek V4.1 Flash.

This was the whole request:

Pull the member table from https://en.wikipedia.org/wiki/G20 into a sheet.

What the Spreadsheets agent did

  1. Fetched the page and parsed the table. It used a small Python script with requests, pandas and openpyxl, and installed the table-parsing libraries it was missing.
  2. Fixed its own code before writing the workbook. The first build used a pandas call removed in the current version; it caught the error and changed it, then built the sheet again.
  3. Joined the rows the source splits. China, the European Union and the African Union each appeared twice on the page: head of state on one row, premier or commission president on the other. It joined those names with a slash, so each member is one row: 21 rows, not 24.
  4. Formatted the sheet: header frozen, filter on, text wrapped, and one clean row per member.
  5. Recorded the source. The page address is in the file's properties, so the sheet can be traced back.
  6. Stopped at the table it was asked for. A larger comparison table further down the page (GDP, population, HDI) is a different table, so it left it out and offered to add it on a second sheet.
  7. Put the file where it could be opened, after a mid-run note asking for it in the workspace, and cleaned up its build scripts.

What you get

One sheet, G20 members, with 21 rows and six columns: Member, Leader(s), Finance portfolio, Portfolio minister, Central bank, Central bank governor. A sample of the rows:

member finance portfolio central bank
Argentina Minister of Economy Central Bank of the Argentine Republic
Australia Treasurer Reserve Bank of Australia
Brazil Minister of Finance Central Bank of Brazil
Canada Minister of Finance Bank of Canada
China Minister of Finance People's Bank of China
France Minister of Economics and Finance Bank of France
  • A frozen header, filters and wrapped text, so the sheet is ready to read and sort.
  • One row per member, with the three split members joined rather than duplicated.
  • The source address in the file properties and a live-page caveat: this is a snapshot from the day it was fetched, not a fixed dataset.
  • Only the table you named. Other tables on the page wait for another request.

What it took

time steps tokens images
the import 2.0 minutes 18 691,743 read (674,684 cached), 5,764 written none

It ran on your plan's usage, like any job; Plans, usage & shared usage has what each plan includes.

Why it used little model work: the parsing and the sheet writing are code, and about 97% of what the model read came back from the cache.

How it's different

  • It parses the page's table, not a copy-paste. The result is a real sheet: columns, a frozen header, filters and wrapped text, not text pasted into cells.
  • It fixes the source's shape. A table that splits China, the EU and the African Union across two rows would show 24 members; the agent joined them to 21 and said why.
  • It records where the data came from. The page address is in the file properties, and the agent says the page is live, so the values are a snapshot of the day.
  • It stops at the table you named. The larger GDP and population table further down is a different table; it is not silently folded in.
  • It cleans up after itself. The build scripts are removed from the workspace when the sheet is done.

How the grid, the formula engine and the file tools work: What can the Spreadsheets agent do, and how does it work?

Doing it yourself

  1. Open the agent switcher at the top of the sidebar and pick Specialists → Spreadsheets.
  2. Paste the page address and name the table you want, or describe it: "the member table", "the table under 'Members'".
  3. Check the row and column count against the page. If a member appears twice, ask for the rows to be joined.
  4. Ask for another table on a second sheet if you need one.
  5. Download the workbook, or keep working in the grid.

Limits

  • A web page changes. The sheet is a snapshot from the day it was fetched, not a live feed; run it again to refresh.
  • Split or merged rows need judgment. This run joined three members; check the row count against the page.
  • A page behind a login or a paywall will not fetch this way. Use the Browser agent for a signed-in page.
  • The sheet is a clean rebuild, not the site's formatting. You get a frozen header, filters and wrapped text, not the page's CSS.
  • Only the table you named. Other tables on the same page need another request.

Questions

How do I import a table from a website into Excel with AI? Paste the page address and name the table. The Spreadsheets agent fetches the page, parses the table and writes a clean sheet with a frozen header and filters.

Does it keep the website's formatting? No. It builds a clean sheet with the data and a workable layout: header, filter, wrapped text. The page's colours and fonts are not carried over.

What if a row is split across two lines on the page? It joins the pieces. Here China, the EU and the African Union each had two rows; the agent joined them with a slash, so the sheet has 21 members, not 24.

Is the sheet live? No. It is a snapshot from the day it was fetched, and the page address is recorded in the file properties. Ask again to refresh it.

Can it import a second table from the same page? Yes. Ask for the table by name or position; the agent puts it on a second sheet.

Updated