メインコンテンツへスキップ
WhiskFileWhiskFile
5分で読めますWhiskFile Team

How to Extract Tables from a PDF to Excel or CSV

Extract tables from PDF documents into usable Excel or CSV data. Compare methods — automated extraction, manual copy-paste, and AI-powered tools.

Someone sends you a PDF with a 200-row data table. You need those numbers in a spreadsheet. You try to copy-paste and get... a wall of text with no column structure. Tabs are gone. Rows are merged. The data is useless.

This is one of the most frustrating things about PDFs. Tables look perfect on screen but the underlying data structure is a mess of coordinates and text fragments. Here's how to actually extract them.

Why Copy-Paste Doesn't Work

PDFs don't store tables as tables. There's no <table> tag like in HTML. Instead, each cell's text is positioned independently using X/Y coordinates. When you copy-paste, your clipboard gets the text in reading order (left-to-right, top-to-bottom) but loses all the spatial relationships.

A table that looks like this in the PDF:

| Product    | Q1 Sales | Q2 Sales |
| Widget A   | 12,450   | 14,200   |
| Widget B   | 8,300    | 9,750    |

Becomes this when pasted into Excel:

Product Q1 Sales Q2 Sales Widget A 12,450 14,200 Widget B 8,300 9,750

Everything in one cell. Useless.

Method 1: PDF to Excel Converter (Best for Most Cases)

The most reliable approach:

  1. Open WhiskFile's PDF to Excel converter
  2. Upload your PDF
  3. The converter detects table structures and maps them to spreadsheet columns and rows
  4. Download the .xlsx file
  5. Open in Excel or Google Sheets

I tested this on five different types of PDFs:

| Document Type | Table Complexity | Result Quality | |---|---|---| | Financial statement (3 tables, 120 rows) | Medium | Excellent — all columns aligned correctly | | Product catalog (pricing table, 45 items) | Simple | Excellent — clean extraction | | Academic paper (data table with merged headers) | Complex | Good — merged cells needed minor fixes | | Scanned invoice (table as image) | N/A | Failed — needs OCR first | | Government report (nested subtables) | Very complex | Decent — some nested rows needed manual cleanup |

For straightforward tables — financial data, price lists, inventory, survey results — the converter nails it. Complex layouts with merged cells, nested headers, or spanning rows need some manual cleanup after extraction.

Method 2: PDF to Word, Then Copy to Excel

Sometimes PDF-to-Excel conversion misses table boundaries. An alternative route:

  1. Convert the PDF to Word using PDF to Word
  2. Open the .docx file
  3. Select the table in Word (click inside the table → Table Tools → Select Table)
  4. Copy and paste into Excel

Word's table model is closer to Excel's than PDF's coordinate system, so Word-to-Excel copy-paste preserves column structure much better than PDF-to-Excel copy-paste.

This works well for:

  • Tables that span multiple pages
  • Tables with complex formatting (shading, borders)
  • Tables embedded within text-heavy documents

Method 3: OCR First (For Scanned PDFs)

If the PDF is a scanned image — you can tell because you can't select any text — the table is just a picture. No automated tool can extract columns from a picture without OCR.

  1. Run the PDF through OCR to recognize the text
  2. Then use PDF to Excel on the OCR'd file

OCR quality depends heavily on scan quality. High-resolution, clean scans produce near-perfect results. Blurry, skewed, or low-contrast scans produce errors — particularly with numbers, where OCR might read "1" as "l" or "0" as "O."

Always verify numbers after OCR extraction. A misread digit in a financial table is worse than not extracting at all.

Method 4: Manual Extraction (When Automated Tools Fail)

For truly gnarly tables — hand-drawn grids, PDFs from the 1990s, or tables with merged cells six levels deep — manual extraction is sometimes the only option:

  1. Convert the PDF to text
  2. Open the text in a text editor
  3. Identify the column patterns (usually separated by multiple spaces or tabs)
  4. Use Excel's "Text to Columns" feature (Data → Text to Columns → Fixed Width or Delimited)

Or:

  1. Take a screenshot of the table
  2. Use an AI tool to extract the data from the image (ChatGPT, Google Gemini, or Claude can parse table images reasonably well)
  3. Paste the result into Excel

I resort to this maybe 5% of the time. It's slow but reliable for edge cases.

Tips for Better Extraction

Check the source first. Before extracting, ask: does an Excel version already exist? If someone created the table in Excel and exported to PDF, the original .xlsx is the best source. Ask the sender.

Single pages work better. If your PDF has 50 pages but the table is on pages 12–14, extract only those pages first using Extract PDF Pages. Converters perform better on smaller, focused inputs.

Clean up headers. Extracted tables often have header rows duplicated (from the PDF showing headers on each page). Remove duplicates in Excel after extraction.

Watch for number formatting. Extracted numbers might come through as text. In Excel, if you see numbers left-aligned or with a green triangle warning, select the column → Data → Text to Columns → Finish. This forces Excel to re-interpret the values as numbers.

Verify totals. If the table includes sum rows, check them. This is your built-in accuracy test — if the extracted numbers don't add up to the extracted total, something went wrong during extraction.

Common Table Types and Best Approaches

| Table Type | Best Method | Notes | |---|---|---| | Simple data table (clean columns) | PDF to Excel | Just works | | Financial statements | PDF to Excel | Watch for negative numbers in parentheses | | Price lists / catalogs | PDF to Excel | May need header cleanup | | Survey results | PDF to Excel | Multiple-choice columns extract well | | Scanned documents | OCR → PDF to Excel | Verify numbers manually | | Government forms | PDF to Word → Excel | Complex layouts, merged cells | | Academic data | PDF to Excel | Watch for subscripts/superscripts | | Hand-drawn tables | Manual extraction | AI image parsing can help |

After Extraction: Cleaning the Data

Even the best extraction needs post-processing:

  1. Remove empty rows — converters sometimes insert blank rows at page boundaries
  2. Fix merged cells — split them and fill down
  3. Standardize number formats — remove currency symbols, ensure consistent decimal places
  4. Check column alignment — verify that data didn't shift between columns
  5. Remove duplicate headers — multi-page tables often repeat the header row

This cleanup takes 5–15 minutes for a typical table. Still far faster than retyping hundreds of rows by hand.

The goal isn't perfect extraction — it's getting 90% of the way there automatically, then spending a few minutes on the remaining 10% manually. That's a good trade.

この記事で紹介された無料ツール

その他の記事