# How to Extract a Table From a Website to Excel or CSV

Source: https://supercommands.com/blogs/how-to-extract-tables-from-any-website-to-csv-or-excel
Author: Akshay A
Updated: 2026-10-21

> Extract a table from a website to Excel or Google Sheets with Excel From Web, IMPORTHTML, clean paste shortcuts, or a one-command CSV download.

To extract a table from a website to Excel, go to **Data**, then **From Web**, paste the URL, pick the table in the Navigator and click **Load**. In Google Sheets, type `=IMPORTHTML("URL", "table", 1)`. If the table is behind a login or built by JavaScript, both fail, so download it from your browser as CSV instead.

This guide is for anyone moving a web table into a spreadsheet, from a one-off copy to a weekly refresh.

## How do I extract a table to Excel with From Web?

Use **From Web**, built into Excel for Microsoft 365 via Power Query.

1. On the **Data** tab, click **From Web** (or **Get Data**, then **From Other Sources**, then **From Web**).
2. Paste the page URL and click **OK**.
3. In the **Navigator**, click each entry under **Suggested Tables** to preview it.
4. Click **Load**, or **Transform Data** to remove columns or fix types first.

The import stays connected: right-click the table and choose **Refresh** for the latest numbers. If your table is missing, try **Add Table Using Examples** and type two values from it.

## How do I import a web table into Google Sheets?

Use `IMPORTHTML`. Example:

`=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_largest_cities", "table", 2)`

- The third argument is the table's position on the page, counting from 1; change it if you get a layout table.
- Results refresh about every hour, per Google's [spreadsheet settings help](https://support.google.com/docs/answer/58515).
- To freeze the data, copy the range and paste with `Ctrl + Shift + V` (values only).

> **Note:** From Web and `IMPORTHTML` fetch the page from a server, not your browser. They miss logged-in pages (CRM reports, bank statements), JavaScript-built tables and rows behind "Load more".

## How do I copy a small table without breaking formatting?

Select only the table and paste as plain values.

1. Click before the first header cell, then `Shift`-click after the last data cell.
2. Copy with `Ctrl + C` (`Cmd + C` on Mac).
3. **Google Sheets:** `Ctrl + Shift + V` (`Cmd + Shift + V`) pastes values. **Excel:** `Ctrl + Alt + V`, then **Text** or **Unicode Text**; on Mac, **Edit**, then **Paste Special**.

Then check for shifted columns and numbers stored as text.

## How do I download tables behind a login as CSV?

Export them from the page you already have open. With SuperCommands for Chrome, Edge and Brave:

1. Load every row first: set page size to maximum and apply filters.
2. Press `Alt + S`, type **Download All Tables** and press `Enter`.
3. Each standard HTML table downloads as its own CSV file.

It reads real HTML tables on the active page only: no pagination, card layouts or schedules. Canvas charts, table images and virtualized grids are not guaranteed ([Download All Tables docs](https://supercommands.com/docs/download-tables)). For data across many pages, a scraper fits better; see [SuperCommands vs Instant Data Scraper](https://supercommands.com/blogs/supercommands-vs-instant-data-scraper) and our [table downloader roundup](https://supercommands.com/blogs/best-table-downloader-extensions-chrome-edge-brave).

> **Tip:** Double-clicking a CSV can strip ZIP code zeros and turn long IDs into scientific notation. In Excel use **Data**, then **From Text/CSV**, **Transform Data**, set the ID column to **Text**, then **Close & Load**. In Sheets, **File**, then **Import**, and set **Convert text to numbers, dates, and formulas** to **No**.

## Which one should you pick?

- Pick **Excel From Web or `IMPORTHTML`** if the table is public and you want it to refresh.
- Pick **copy and paste as values** if you need a few rows once.
- Pick **Download All Tables** if the table is behind a login, built by JavaScript, or one of several on a page; SuperCommands is free and open source.
- Pick **a scraper** for hundreds of rows across pages; see [SuperCommands vs Data Miner](https://supercommands.com/blogs/supercommands-vs-data-miner).

## FAQ

### How do I copy a table from a website into Excel without formatting?

Copy the table, then press `Ctrl + Alt + V` in Excel and choose **Text**. In Google Sheets, `Ctrl + Shift + V` pastes values only.

### Can Excel pull a table from a website automatically?

Yes. **Data**, then **From Web** creates a refreshable connection, but only for pages Excel can load without your browser login.

### Why does IMPORTHTML return "Could not fetch URL" or an empty result?

The page may block automated requests, need a login, or build the table with JavaScript. Try another table index, then export from the browser.

### Can I export a table to Excel format directly with SuperCommands?

It downloads CSV files, which Excel opens directly. Save as .xlsx from Excel if you need that format.
