Wikipedia table to Excel: 4 ways, and which keeps columns clean

In short: Moving a Wikipedia table to Excel takes one of four routes: copy-paste for short tables, Excel's From Web (Power Query) for refreshable imports, Google Sheets IMPORTHTML for a live formula, or a browser extension for one routine across many sites. Strip the footnote markers, and credit Wikipedia under CC BY-SA if you share the result.
Wikipedia is full of tidy tables: populations, election results, sports records, the tallest buildings in a city. Getting one into a spreadsheet sounds trivial, yet the result often arrives with shifted columns, merged headers, or footnote markers such as [3] glued to the numbers. Below are four methods, what each one is good at, how to clean the result, and the license rules to follow if you publish the data.
Good news first: Wikipedia serves its tables as plain HTML, so the tools already built into Excel and Google Sheets work well here. In many cases you will not need anything else.
Step 1: Try copy and paste for a short table
For a table of a dozen rows, start here. It takes seconds and costs nothing.
- Select the table on the Wikipedia page, from the header row down to the last row.
- Copy it with Ctrl+C (Cmd+C on a Mac).
- In Excel, click an empty cell and use Paste Special > Text or Match Destination Formatting, so links and styles stay behind.
- Check the first and last rows, and any row with a merged cell: that is where columns usually slip.
Copy-paste struggles with long tables you have to select while scrolling, with labels that span several rows, and with footnote markers, which travel with the text. A cell may read 1,234[5] instead of a number you can sum.
Step 2: Import the table with Excel's From Web (Power Query)
Excel can read the page for you and pick out its tables. Microsoft documents this web connector as part of Excel with a Microsoft 365 subscription, and you need an internet connection:
- On the Data tab, select From Web (or Get Data > From Other Sources > From Web).
- Paste the URL of the Wikipedia article and select OK.
- In the Navigator dialog, browse the Suggested Tables and click each one to preview it.
- Choose your table and select Load to send it to the grid, or Transform Data to fix headers and data types in the Power Query Editor first.
- If none of the suggestions fits, use Add Table Using Examples: type a few sample values for each column, and Power Query extracts the data that matches the pattern.
The main advantage is refresh. When the article is updated, refresh the connection, and the sheet picks up the latest version, which suits tables such as rankings or results that change over time.

Step 3: Pull it live with Google Sheets IMPORTHTML
Google Sheets has a formula for exactly this job, and Google's own help page uses a Wikipedia article as its example. The syntax is IMPORTHTML(url, query, index).
- Open a blank sheet and click cell A1.
- Type
=IMPORTHTML("https://en.wikipedia.org/wiki/ARTICLE_NAME","table",1), replacing the sample URL with your article's URL. Keep thehttps://and the quotation marks. - The second argument is
"table"or"list". The third is the position of that table on the page, starting at 1. - If the wrong data appears, change the index to 2, 3, and so on. Some page elements, such as infoboxes, are built as tables too, so the one you want is often not number 1.
- To freeze the result, copy the range and use Edit > Paste special > Values only. Then use File > Download > Microsoft Excel (.xlsx) if you need the file in Excel.
The formula stays linked to the page, which is handy for live data and a trap if you expected a fixed snapshot. For IMPORTXML and pages where these formulas return nothing, see our guide to scraping data into Google Sheets.
How to do it with ScrapeSheet
Be honest with yourself here: for a single Wikipedia table, the methods above cost nothing extra and are usually enough. A browser extension earns its place when you want one routine for every site you work with. The full walkthrough is on our page about exporting HTML tables to CSV.
- Install ScrapeSheet from the Chrome Web Store and pin it.
- Open the Wikipedia article and click the ScrapeSheet icon to open the panel.
- Click Extract. It detects the tables and lists on the page on its own.
- Pick the table and export it as an Excel
.xlsxfile, as a CSV file, or to the clipboard. - For Google Sheets, paste from the clipboard, or import the CSV with File > Import.
Know the limits before you start. The free plan allows up to 20 rows per export and one page per run, so a long Wikipedia table is better handled with Excel's From Web or IMPORTHTML above. ScrapeSheet Pro (€12.99 per month) removes the row limit, covers all pages, and adds AI extraction with your own Claude or OpenAI key. You can browse other jobs it handles on the use cases page.
Which method keeps the columns clean?
Excel's From Web and IMPORTHTML read the structure of the table itself rather than whatever you highlighted on screen, so they avoid most of the shifted columns that copy-paste can produce. Here is a quick comparison:
| Method | Best for | Watch out for |
|---|---|---|
| Copy and paste | One short table | Merged cells, shifted columns |
| Excel From Web | Refreshable imports | Picking the right suggested table |
| IMPORTHTML | Live data in Sheets | Guessing the table index |
| ScrapeSheet | One routine for many sites | Free plan: 20 rows per export |
Strip the footnote markers
Whatever the method, Wikipedia's reference markers usually come along. Remove them before you calculate:
- Excel: open Find and Replace (Ctrl+H), find
[*]and replace it with nothing. The asterisk is Excel's wildcard for any characters, so check any cell that had text between two markers. - Google Sheets: in a helper column, use
=REGEXREPLACE(TO_TEXT(A2),"\[[^\]]*\]","")so cells that are already numbers do not return an error, then wrap it inVALUE()if you need a number rather than text.
Can you reuse Wikipedia data? The license and the EU rules
What CC BY-SA asks of you
Wikipedia's text is published under the Creative Commons Attribution-ShareAlike license, CC BY-SA 4.0. Its conditions apply when you share the material, for example in a published report, on a website, or in a dataset you hand to others. In that case:
- Attribute: credit Wikipedia and the specific article, with a link to it.
- Name the license: state CC BY-SA 4.0 and link to the license text.
- Say what changed: mention that you cleaned, filtered, or combined the data.
- Share alike: if you publish an adapted version, release it under the same or a compatible license.
Plain facts, such as a single population figure, are generally not protected by copyright, but crediting the source is good practice and costs one line. Images on Wikipedia carry their own licenses, so check each one separately. For the wider picture on terms, personal data, and copyright, see our guide on whether web scraping is legal.
Where the EU text-and-data-mining rules fit
In the EU, Directive (EU) 2019/790 sets two copyright exceptions for text and data mining. Article 3 covers research organizations and cultural heritage institutions that mine works they have lawful access to for scientific research. Article 4 allows reproductions and extractions of lawfully accessible works for text and data mining, unless the rightholder has expressly reserved that use in an appropriate manner, such as machine-readable means for content made publicly available online. Each member state applies these rules through its own law.
For a Wikipedia table, the license already allows reuse, so the exceptions are mostly background. They concern copying for analysis; once you publish the table, the CC BY-SA conditions above still apply.
Not legal advice. This is general information as of October 2026. Check the license notice at the bottom of the article you use, and get professional advice for commercial projects. If you need data from many articles at once, use Wikimedia's official database dumps or API rather than loading page after page.
More step-by-step guides are on the ScrapeSheet blog.
FAQ
How do I copy a table from Wikipedia to Excel?
For a short table, select it, copy it, and use Paste Special > Text in Excel. For a cleaner, refreshable import, use Data > From Web, paste the article URL, and pick the table in the Navigator.
How do I import a Wikipedia table into Google Sheets?
Use =IMPORTHTML("https://en.wikipedia.org/wiki/ARTICLE_NAME","table",1) with your article's URL. If the wrong table appears, raise the last number until you reach the one you want.
Why does IMPORTHTML show the wrong Wikipedia table?
The index counts every table on the page, and elements such as infoboxes are built as tables too. Try 2, 3, and so on until the right table loads.
How do I remove the [1] footnote markers from a Wikipedia table?
In Excel, use Find and Replace with [*] in Find what and nothing in Replace with. In Google Sheets, use REGEXREPLACE with TO_TEXT in a helper column and wrap it in VALUE() if you need numbers.
Do I need to credit Wikipedia if I reuse its tables?
If you share or publish the material, yes: Wikipedia's text is under CC BY-SA 4.0, which asks for attribution, a link to the license, a note of changes, and the same or a compatible license for adaptations. This is general information, not legal advice.
Sources
General information, not legal advice. Always check the website's terms and the data-protection rules that apply to you.