How to export a Wikipedia table to Excel
Wikipedia is full of useful tables: city populations, election results, sports records, discographies. Getting one into Excel cleanly is harder than it looks. Merged cells, footnote marks like [1], sortable headers and numbers written as "1,234,567" tend to break a simple copy and paste.
Here are three methods, from the quickest to the most robust.
Method 1: copy and paste
- Select the table on the page with your mouse, from the first header to the last cell.
- Copy it (Ctrl+C, or Cmd+C on a Mac).
- Paste it into an empty Excel sheet.
Works for: small, simple tables.
Watch out for: merged cells that end up in the wrong column, footnote marks glued to your numbers ("37,468,000[1]"), and links or formatting pasted along with the text. Selecting a long table precisely is also tedious.
Method 2: Excel's "From Web" import
Excel for Windows can read the tables of a web page directly.
- In Excel, open the Data tab and choose From Web.
- Paste the address of the Wikipedia article and confirm.
- In the Navigator window, pick the table you want and click Load.
Works for: tables you want to refresh later, since the query can be re-run.
Watch out for: the import lists every table on the page under generic names, so finding the right one can take a few tries. Footnote marks stay in the data, and the feature is not available in every edition of Excel, especially on Mac.
Method 3: export the table with TableSnap
TableSnap is a browser extension built for exactly this.
- Open the Wikipedia article in Chrome.
- Click the TableSnap icon, or press Alt+Shift+T. Every table on the page is outlined and numbered.
- Pick the table in the list, then choose Copy to paste it into Excel, or download a CSV or a native Excel (.xlsx) file.
What TableSnap fixes for you:
- Merged cells (rowspan and colspan) are expanded, so every row has the right number of columns.
- Footnote marks such as [1] or [note 2] are stripped from the values.
- Numbers like "1,234,567" or "1 234,56" are recognized as real numbers, ready to sum or sort.
- Excel files come with bold headers, auto-sized columns, filters and a frozen header row.
Everything happens inside your browser: the page content is never sent anywhere. Copy and CSV export are free; the native Excel export is part of the Pro license, and three Pro exports are included to try it.
Which method should you use?
- One small table, once: copy and paste.
- A table you need to refresh regularly in Excel for Windows: From Web.
- Clean data in a few seconds, especially with merged cells or footnotes: TableSnap.