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

  1. Select the table on the page with your mouse, from the first header to the last cell.
  2. Copy it (Ctrl+C, or Cmd+C on a Mac).
  3. 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.

  1. In Excel, open the Data tab and choose From Web.
  2. Paste the address of the Wikipedia article and confirm.
  3. 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.

  1. Open the Wikipedia article in Chrome.
  2. Click the TableSnap icon, or press Alt+Shift+T. Every table on the page is outlined and numbered.
  3. 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:

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?