What is table extraction?
Table extraction is the process of finding tables in a PDF and turning them into structured rows and columns, typically saved as CSV or a spreadsheet. It lets you work with figures from invoices, statements and reports without typing them again. It is a common step in bookkeeping, expense reports and data analysis.
Why tables are hard to extract
A PDF does not store tables as tables. It stores pieces of text at positions on the page, sometimes with lines drawn around them. An extractor has to work out which pieces belong to the same row and column by looking at their positions and the gaps between them. Clear grids with ruling lines are easiest; tables without lines, merged cells and columns that wrap onto several lines are harder.
Text PDFs and scans
Extraction needs real text. Statements and invoices exported from software usually have a text layer, so the numbers come out exactly. A scanned page is only an image, so it needs OCR first, and any recognition error then appears in the spreadsheet. For scanned receipts and statements, scan straight at about 300 DPI and check the totals after extraction.
Checking the result
Always compare a few rows with the original before relying on the data. Look for numbers split across two cells, dates read as text, decimal commas and points mixed up, and header rows repeated on every page. A quick sum of a column against the document's total is a simple test that catches most problems. Fix any errors in the spreadsheet rather than in the PDF.
Tools that use this
Guides that put it into practice
- Invoices for your accountantStep by step: merge a month of PDF invoices into one file, stamp a reference on every page, turn the bank statement into Excel and send it all at an e-mail-friendly size.
- Scan receipts for an expense reportStep by step: photograph paper receipts, turn them into one PDF, add PDF invoices, number the pages and make the amounts searchable.
Common questions
- What file format do I get?
- Usually CSV, which opens in any spreadsheet program, or a spreadsheet file with one sheet per table. Check which separator your spreadsheet expects when opening a CSV file.
- Can I extract tables from a scanned bank statement?
- Only after OCR. Once the text is recognised, the table can be extracted, but check the figures against the original.
- Why are some columns merged in my spreadsheet?
- When the gaps between columns are narrow, the extractor may read two columns as one. Split them in the spreadsheet afterwards. Spreadsheet programs have a text-to-columns function for exactly this.