Everything happens in your browser. Nothing is uploaded.

How to extract tables from a PDF as CSV or Excel

If you only want the data from a PDF, not the commentary around it, converting the whole document gives you a lot to throw away. Extracting tables keeps the pages where a table was actually found and skips everything else. This guide explains how it differs from a full conversion, how tables are located and what to do with tables that continue over several pages.

Extract tables or convert to Excel?

PDF to Excel keeps every page, prose included, one sheet each, so nothing from the document goes missing. Extract tables keeps only the pages where a table was found and skips the rest entirely.

For a walkthrough of the full conversion, see how to convert a PDF table to Excel.

How tables are found

A PDF never records “this is a table”, only text at coordinates. Extraction therefore looks for vertical bands of blank space that run down the whole page and treats them as column gaps. It is the same method PDF to Excel uses, and equally an educated guess based on alignment.

How to extract tables with LeafLock

Extract tables works in your browser, so the PDF is not uploaded.

  1. Open Extract tables and choose your PDF.
  2. Choose the output: CSV or Excel.
  3. Run it, then download the files.
  4. Open the result and compare it to the pages.

CSV or Excel?

Pick whichever the next step needs. You can run the tool again for the other format.

Tables that span several pages

Each page becomes its own file (CSV) or sheet (Excel), in page order. They are not merged into one table. Telling where a continued table’s repeated header ends and its data resumes is exactly the kind of guess this tool avoids making for you. Merging is quick to do by hand once you can see the pages: delete the repeated header rows and paste the sheets together.

When no table is found

The tool says so rather than guessing. Check that the PDF really has a column layout. If it is a scan with no text layer, run OCR PDF first; see how to turn a scanned PDF into searchable text.

Checking the output

  1. Compare the row count on each sheet to the page.
  2. Look for a column that has merged with its neighbor, or one split into two.
  3. Check totals against the PDF.
  4. Look at numbers: everything is text until you convert it in your spreadsheet.

Limits to remember

Merged cells, formulas and formatting do not come across. Tables whose columns are very close together, or that rely on lines rather than spacing, are the most likely to need a manual fix.

Summary

  1. Only pages with a table are kept; the rest are skipped.
  2. Tables are found by column gaps, which is a guess.
  3. Choose CSV for systems, Excel for checking.
  4. Multi-page tables are not merged for you.