
The data you need is right there on a webpage — a Wikipedia statistics table, a competitor’s price list, a sports league standings page, a government dataset rendered as HTML — and you need it in a spreadsheet. Knowing how to convert an HTML table to Excel turns the entire web into your data source, and the basic move takes literally seconds: select, copy, paste. But as anyone who has pasted a web table knows, the result is often a mess of merged cells, stray formatting, phantom blank rows, and numbers stored as text. This guide gives you four reliable methods ranked by effort: the instant copy-paste trick (with the paste options that make it clean), Power Query’s “From Web” importer for structured, refreshable imports, Google Sheets’ IMPORTHTML formula for live-linked tables, and browser extensions plus online tools for the awkward cases.
You will also learn the cleanup routine that turns a ragged paste into an analysis-ready table, how to handle paginated tables and JavaScript-rendered pages that defeat simple copying, and the legal and etiquette basics of reusing web data. Whether you are a student in Delhi compiling cricket statistics, a fantasy-football manager in London tracking player data, a real-estate analyst in Sydney scraping listings, or a marketer in Toronto benchmarking competitor pricing, these techniques will save you hours of retyping.

Why Web Tables Are Tricky (And Worth Taming)
An HTML table (<table> with rows <tr> and cells <td>) looks like a spreadsheet but behaves like a webpage. Cells can span multiple rows or columns (rowspan/colspan), headers may be styled <th> cells, invisible elements lurk in the markup, and numbers are often text with currency symbols, footnote markers like [1], or thousands separators baked in. Copy-paste carries all of this baggage along.
Worse, many modern tables aren’t really HTML tables at all — they are JavaScript-rendered grids that only exist after scripts run, which defeats Power Query and simple scrapers. And some tables are paginated (50 rows per page across 40 pages) or hidden behind logins. The method you choose depends on which of these you are facing — the decision guide at the end of each method will steer you.
Method 1: Copy-Paste — The Fastest HTML Table to Excel Trick
For a single, well-formed table, nothing beats the clipboard:
- Select precisely. Click just before the table’s top-left cell and drag to just after its bottom-right cell — or click inside the table and use your browser’s developer tools to select the
<table>element. Avoid selecting page headers, ads, or navigation. - Copy with Ctrl+C (or Cmd+C on Mac).
- Paste into Excel. Click cell A1 and press Ctrl+V. Excel reconstructs rows and columns from the HTML.
- Use Paste Special when it misbehaves. Right-click → Paste Special → Text (or Match Destination Formatting) strips web styling while keeping the grid. This single option fixes about half of all messy pastes.
- Save as .xlsx.
When it works: simple static tables — Wikipedia, sports stats pages, price lists. When it fails: merged header cells (they paste as blank offsets), nested tables, or anything JavaScript-rendered. For those, continue to Method 2.

Method 2: Power Query “From Web” — The Robust Route
Power Query treats a webpage as a data source: it parses the HTML, lists every table it finds, and imports the one you pick — with a refreshable query you can re-run when the page updates.
- In Excel, go to Data → Get Data → From Other Sources → From Web.
- Paste the page URL and click OK. (If prompted for credentials, choose Anonymous for public pages.)
- The Navigator shows every table on the page as “Table 0”, “Table 1”, etc. Click each to preview; select the right one.
- Click Transform Data. Promote headers (Use First Row as Headers), remove blank top rows, unpivot or fill merged cells as needed, and set data types.
- Close & Load. The table lands as a formatted Excel table.
Pro move — Suggested Tables: newer Excel versions offer an “Add Table Using Examples” mode where you type a couple of example values and Power Query figures out which page elements to extract — handy for pages where the Navigator’s auto-detected tables are wrong. Our Power Query guide covers the editor in depth.
Method 3: Google Sheets IMPORTHTML Formula
Google Sheets can pull a web table live with one formula — no copy-paste, and it refreshes automatically:
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)", "table", 2)
The arguments: the page URL, "table" (or "list"), and the index — which table on the page to grab, counting from 1. Finding the right index is trial and error: try 1, 2, 3 until the preview shows your table. Then File → Download → Microsoft Excel (.xlsx) to get your workbook.
Caveats: IMPORTHTML refreshes roughly hourly and can break if the site redesigns its tables (the index shifts). It also fails on JavaScript-rendered content and login-walled pages. For a one-time grab it is unbeatable; for a durable pipeline, Power Query or a proper scraper is sturdier. Our Google Sheets import guide covers the surrounding workflow.

Method 4: Browser Extensions and Online Converters
When copy-paste mangles and Power Query can’t see the table, extensions help. Table-capture extensions (search your browser’s store for “table to Excel” or “table capture”) detect HTML tables on the page and export them directly to XLSX/CSV — many handle merged cells better than the clipboard does. Online converters take a pasted HTML snippet or a URL and return a spreadsheet; the csvtoexcel.site/ converter handles pasted table HTML in your browser with nothing uploaded.
Evaluate extensions skeptically: check permissions (a table exporter has no business reading your browsing history), prefer open-source or well-reviewed ones, and never grant them access to banking or email tabs. For a single table, the five minutes spent vetting an extension often exceeds the time of just cleaning a paste — reserve this method for recurring or badly-structured tables.
URL-to-spreadsheet web services deserve a mention too: paste a page URL into the service, and it returns an XLSX or CSV. They are convenient when you cannot install anything — a locked-down work computer, a library terminal — but they share two limits: they only see the static HTML (no JavaScript rendering), and you are handing the URL to a third party, so avoid them for pages behind logins or containing personal data. For public tables on a restricted machine, though, they are a legitimate shortcut.
Cleaning Up Imported Web Tables
However the table arrives, it needs the same five-minute cleanup:
- Delete junk rows. Web tables often import with blank spacer rows, repeated header rows, or footer notes. Sort or filter to find them, then delete.
- Fix merged cells. Select the range, click Merge & Center → Unmerge Cells, then select the column and use Go To Special → Blanks +
=↑+ Ctrl+Enter to fill values down. - Strip footnote markers. Wikipedia-style
[1]references pollute numbers. Use Find & Replace with wildcards, or a helper column with=REGEXREPLACEin Sheets / Power Query’s replace. - Convert text-numbers to numbers. Select the column → Data → Text to Columns → Finish, or multiply by 1 in a helper column. Remove currency symbols and thousands separators first.
- Normalize headers. Rename to short, unique, machine-friendly names (no spaces, no duplicates) — your future pivot tables will thank you.

Worked Example: Wikipedia Table to Spreadsheet
Let’s grab a real table: Wikipedia’s “List of countries by GDP (nominal)” — a classic sortable wikitable.
- Power Query route (recommended): Data → From Web → paste the Wikipedia URL → in the Navigator, preview the tables until you find the GDP ranking → Transform Data.
- Promote headers (Transform → Use First Row as Headers). Remove the top rank column if you don’t need it.
- Clean the GDP column: it contains values like
28,783,000[1]. Replace[*footnote patterns, remove commas, then change type to Whole Number. Values are in millions of USD — note the unit in the header (gdp_usd_millions). - Close & Load. Build a quick bar chart of the top 10 economies — you now have a live-linked dataset that refreshes when Wikipedia updates.
IMPORTHTML route: =IMPORTHTML("https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)", "table", 2) — adjust the index until the GDP table appears. Download as .xlsx when done. Either route takes under five minutes; the Power Query version wins on refreshability and cleaning power.
Sanity-checking the result: before analyzing, verify three things. First, the row count — Wikipedia’s table should give you roughly 190+ economies; far fewer means you grabbed the wrong table or the import truncated. Second, the units — GDP figures on that page are in millions of US dollars, so the United States shows as ~28,780,000, not 28.78 trillion; label your header accordingly or your charts will be off by six orders of magnitude. Third, sort the GDP column descending and confirm the order looks sane (US, China, Germany near the top) — a surprising order usually means text-numbers sorted alphabetically, and you need to finish the numeric conversion.
Handling Pagination, JavaScript Tables, and Login Walls
Paginated tables
When a table spans many pages, check for a “View all” / “Show 500 per page” option first — one import beats forty. Otherwise, import each page as a separate Power Query (the URLs usually differ by ?page=2) and Append Queries. Some table-capture extensions crawl pagination automatically.
JavaScript-rendered tables
If the table appears in your browser but Power Query’s Navigator shows nothing, the content is rendered by JavaScript after load. Options: copy-paste (the browser has the rendered DOM), a table-capture extension, or the site’s underlying API — check the Network tab in developer tools for XHR requests returning JSON, which you can then convert with our JSON-to-Excel methods.
Tables locked inside PDFs linked from the page
Sometimes the “table” you need is actually a PDF linked from the page — annual reports, government statistics, academic papers. None of the HTML methods apply; instead, use Power Query’s From PDF connector (Data → Get Data → From File → From PDF), which extracts tables from PDF pages with surprising accuracy. For scanned PDFs (images of tables, not real text), you need OCR first — free options include Google Drive’s “Open with Google Docs” (which OCRs on import) or dedicated PDF-to-Excel tools. Always verify OCR output cell by cell; a misread digit in a financial table is worse than no data at all.
Login walls and bot protection
Power Query can authenticate to some sites (choose the right credential type in the connection dialog), but CAPTCHAs and aggressive bot detection usually win. Don’t fight them — export from inside the logged-in session (most dashboards have CSV export), or copy-paste from your authenticated browser tab, which is both easier and more polite to the site.
Troubleshooting Web Table Imports
Navigator shows no tables
The page likely renders content with JavaScript, or the data isn’t in a <table> element (many modern sites use <div> grids). Try copy-paste, an extension, or the underlying API.
Wrong table imported (index shifted)
Pages change. In Power Query, re-open the Navigator and reselect; with IMPORTHTML, bump the index up or down. For durability, prefer selecting by table example rather than bare index.
Numbers arrive as text
Currency symbols, spaces, and footnote markers block numeric conversion. Strip them first (see cleanup), then set the type. In Power Query, the “ABC/123” auto-detect often needs a manual nudge.
Dates flip day/month
US sites write MDY, most of the world writes DMY. Set the column type explicitly with the right locale — never trust auto-detect on ambiguous dates.
Refresh breaks after a site redesign
Refreshable imports are coupled to page structure. When a refresh fails, open the query, step through the applied steps to find the broken one (usually a renamed column), and fix it — five minutes, not a rebuild.
Cells contain images instead of text
Some tables show status icons, flags, or star ratings as images with no text alternative — the import gives you blank cells. Workarounds: check whether the image filenames or alt text carry the meaning (Power Query sometimes surfaces these as attributes), look for a hidden text version of the same data elsewhere on the page (many sites include accessible tables for screen readers), or map the handful of distinct icons manually — there are rarely more than five or six unique ones. As a last resort, OCR the screenshot of the table, but verify every cell; icon-to-text mapping by hand is tedious yet reliable for small tables.

Pro Tips for Web-to-Excel Workflows
- Try the official export first. A site’s own CSV download is cleaner than any scrape — look for it before reaching for tools.
- Paste Special → Text is the fastest cleanup for simple tables.
- Name your queries. “GDP_Wikipedia_2026” beats “Query1” when you revisit in six months.
- Record the source URL and date in a README sheet — web data goes stale, and provenance matters.
- Snapshot before refreshing. Copy a refreshable table’s values to a dated sheet before hitting Refresh, so you keep history.
- Respect rate limits. Refreshing a query every minute is a good way to get blocked; match the site’s actual update cadence.
- Learn basic XPath/CSS selectors. Thirty minutes of learning unlocks precise extraction from pages where auto-detection fails.
- Check terms of service before republishing or automating against someone’s site.
- Keep a “web sources” log. One sheet listing every scraped table’s URL, import date, and method turns a pile of disconnected workbooks into a maintainable dataset six months later.
- Prefer stable sources. Wikipedia and official statistics portals change structure rarely; a startup’s marketing page redesigns quarterly. Weight your effort accordingly.
- Test with a small table first. Before building a refreshable pipeline around a 10,000-row paginated table, prove the method on a single page — it exposes authentication, rendering, and structure problems while they are still cheap to fix.

Found a table layout that defeats every method above? join the discussion in our community forum — bring the URL and the community will help crack it.
Frequently Asked Questions
How do I copy a table from a website to Excel?
Select the table in your browser, copy it, and paste into Excel. For cleaner results use Paste Special → Text, or better, use Power Query’s From Web (Data → Get Data → From Other Sources → From Web), which imports the table structure properly and stays refreshable.
Why does my pasted web table look messy in Excel?
Browsers copy formatting, merged cells, and hidden elements along with the data. Paste as plain text, or import with Power Query From Web, then work through the cleanup routine: unmerge cells, delete junk rows, strip footnotes, and convert text-numbers.
What is the IMPORTHTML function in Google Sheets?
IMPORTHTML pulls a table or list from a web page into Google Sheets. The syntax is =IMPORTHTML("URL", "table", index), where index counts which table on the page to import, starting at 1. It refreshes automatically.
Can Power Query import tables from any website?
Power Query’s From Web handles most public pages with real HTML tables. It struggles with JavaScript-rendered tables, login walls, and aggressive bot protection — for those, copy-paste from your browser or a table-capture extension works better.
Is it legal to copy tables from websites into Excel?
Copying for personal analysis is usually fine, but republishing scraped data can violate a site’s terms of service or copyright. Check the terms, respect robots.txt, and prefer official exports or APIs when available.
How do I import a table that spans multiple pages?
Look for a “view all” option first. Otherwise import each page as a separate Power Query (URLs usually differ by ?page=N) and append them, or use a table-capture extension that crawls pagination automatically.