RobotsHelp

Claude AI Extract Data From PDF Into a Spreadsheet

Written by

in

You have fourteen supplier invoices sitting in a folder as PDFs, and someone needs them in a spreadsheet by Friday. Retyping them is slow and you will mistype a number somewhere. The faster way: have Claude AI extract the data from the PDFs into one table, with columns you choose, one row per invoice, and a check column that tells you which rows to look at before you trust them.

Imagine it’s Thursday afternoon. You drop the fourteen files into one chat, paste one prompt, and two minutes later there’s a table on your screen with a downloadable Excel file next to it. Two rows are marked “check”, because the totals don’t add up. You open those two PDFs, fix them, and the job is done before your next call.

Want more practical AI workflows like this one, free? Join Launchpad.

No password needed – your reset opens instantly.

No password. Just your email, and you’re in.

Short answer

Upload the PDFs to Claude and tell it exactly which columns you want, in which order, and in which format. Ask for one row per document (or one row per line item), the page number each value came from, and “not found” when a field is missing. Tell it to copy values exactly as printed and not to calculate anything, except one check column you define. Then ask for the result as an Excel or CSV file, and spot-check three rows against the PDFs before you use it.

This works because Claude reads a PDF in two ways at once. Anthropic’s documentation says each page is turned into an image and its text is extracted next to it, so Claude sees the layout of a table and not only the words (Claude PDF support docs). That matters for invoices and statements, where the meaning of a number depends on which column it sits in.

What this is good for (and what it isn’t)

Pulling data out of a PDF is a different job from summarizing it. You don’t want Claude’s opinion. You want the same fields, from every file, in the same shape, so you can sort, filter and add them up. Typical cases at work:

  • Invoices, quotes and receipts into a cost sheet (supplier, number, date, net, VAT, total).
  • Bank or card statements into a list of transactions.
  • Price lists or product sheets from suppliers into one comparison table.
  • Order forms, registration forms or timesheets into rows you can import somewhere else.
  • Deadlines and owners out of a project plan (there’s a section on that below).

It is not the right tool when the numbers have to be perfect and there is nobody to check them, for example your bookkeeping of record. Use it to do the typing, and keep a person on the checking. If you need to understand a long report rather than lift data out of it, our guide to analyzing long PDF files with Claude fits better. If the numbers you need are in charts, use the guide to analyzing charts in a PDF, because values read off a chart are estimates, not printed data.

Before you upload: four quick checks

  1. Are you allowed to upload it? Invoices and statements often hold client names, bank details or salaries. Check your company’s rules on AI tools first.
  2. How many files, how many pages? Claude’s Help Center lists up to 20 files per chat and 1000 pages per PDF. Visuals (layout, images, charts) are analyzed in PDFs of 100 pages or fewer; from 101 to 1000 pages Claude reads the text only (Claude Help Center, upload files). For forty invoices, work in two batches of twenty. For a 300-page statement, split it.
  3. Is it a scan? A scanned page is a picture. Claude can still read it if it is sharp and straight, but expect more misread digits. Rescan crooked or blurry pages before you start.
  4. Is file creation on? If you want Claude to hand you a real .xlsx file, turn on Code execution and file creation in Settings, under Capabilities. Anthropic says it’s available on Free, Pro, Max, Team and Enterprise plans, and on Team and Enterprise an owner can switch it off for the organization (Claude Help Center, create and edit files). Without it you still get a table you can copy.

How to extract data from a PDF with Claude, step by step

Step 1: decide your columns before you open Claude

This is the step people skip, and it’s the one that decides whether the result is usable. Open the spreadsheet where the data has to end up and copy its column headers. Claude should fill your columns, not invent its own. If the sheet doesn’t exist yet, write the headers in the order you’ll want them when you sort.

Step 2: the extraction prompt

Upload the files, then paste this, with your own columns:

I uploaded 14 supplier invoices as PDFs.
Extract the data into one table, one row per invoice, with exactly these columns in this order:

file name | supplier | invoice number | invoice date | due date | currency | net amount | VAT amount | total | page

Rules:
- Copy every value exactly as printed. Do not round, convert or correct anything.
- Write dates as YYYY-MM-DD. Add a column "date as printed" so I can check the format.
- Amounts as plain numbers with a dot for decimals, no currency symbol.
- If a field is not in the document, write "not found". Never guess.
- If a value is hard to read, still fill it in and write "unclear" in a last column called notes.
- Do not calculate any value, except the check column below.

Add one more column called check: net amount + VAT amount minus total. It should be 0.
Show the table, then list every row where check is not 0 or notes is not empty.

The “date as printed” column is there for a reason. 03/04/2026 is the 3rd of April in most of Europe and March 4th in the US. If you don’t make that visible, one supplier’s dates end up quietly wrong.

Step 3: fix the flagged rows

Open only the PDFs Claude flagged and look at the page it named. Most of the time the check column catches one of three things: a discount line Claude didn’t count, a total that includes shipping, or a digit it misread on a scan. Tell Claude what the right value is and ask it to update that row. Don’t ask it to “fix the totals”, or it may change the numbers to make the check pass.

Step 4: get the file

Create an Excel file from the corrected table.
Sheet 1: all rows. Amount columns as numbers, date columns as real dates.
Sheet 2: only the rows that were flagged, with the reason.
Also give me the same table as a CSV file.

Open the file and check that the amounts are right-aligned (numbers) and not left-aligned (text), so your formulas work on them.

Step 5: spot-check before you send it

  • Count the rows. Fourteen invoices should give fourteen rows.
  • Pick three rows at random and compare every field with the PDF.
  • If the documents print a grand total (a statement, a price list), add up your column and compare.

Three minutes of checking is what makes the rest of the work safe to trust.

Tables that run over several pages

Line-item tables, statements and price lists often continue over three or four pages, and that’s where rows go missing: at the page break, or where one line wraps onto two. Ask for this explicitly:

The table of order lines starts on page 6 and ends on page 9.
Give me one row per order line: item code | description | quantity | unit price | line total | page.
A description that wraps onto a second line is still one row.
Skip repeated header rows at the top of each page.
At the end, tell me how many rows you found on each page.

The row count per page is your quick check. If page 7 clearly has 25 lines and Claude says 23, you know where to look.

Extract deadlines from a project plan PDF

The same method works for dates. A project plan, a statement of work or a tender document usually has deadlines spread over several pages, some as real dates and some as “ten working days after approval”. Ask Claude to pull them out into a list you can actually plan with:

From this project plan, list every deadline, milestone and due date.
Columns: task or milestone | owner (if named) | due date (YYYY-MM-DD) | type | depends on | page

type is either "fixed date" or "relative".
For relative deadlines ("two weeks after sign-off"), leave due date empty and copy the wording into depends on. Do not work out the date yourself.
Sort by due date, relative deadlines at the bottom.

Keeping relative deadlines separate is the important part. If Claude turns “two weeks after sign-off” into a date, it has to assume when sign-off happens, and that assumption ends up in your calendar looking like a fact. Once you know the sign-off date, fill those in yourself or give Claude the date and ask it to calculate them. Then paste the table into your planning sheet, or into your task tool if it has a CSV import.

Which AI tool should you use to extract table data from a PDF?

Honest answer: it depends on the PDF.

  • Claude is a good fit for mixed documents: different layouts from different suppliers, scans, fields scattered across a page, or when you want rules like “not found” and a check column. It reads both the text and the page image (up to 100 pages per file), and can hand you an Excel file.
  • Excel’s own PDF import is worth trying first when you have one clean, digital PDF with a proper table in it. In Excel for Windows you go to Data, Get Data, From File, From PDF, and pick the tables it finds (Microsoft Support, import data with Power Query). No AI, nothing to check for invented values. It isn’t in Excel for Mac, and a scanned page has no real table for it to find.
  • ChatGPT or Gemini can do the same kind of job, and the prompts on this page work there too. File limits and features differ per tool and plan, so check their help pages before you upload a big batch.

Whichever you use, the method is what makes it reliable: fixed columns, “not found” instead of guesses, a check column, and a spot-check.

Once the table sits in a spreadsheet, you can start asking it questions. Our guide on using ChatGPT to analyze a spreadsheet for work shows how to get answers you can check against the rows.

Want the totals and lookups to update by themselves next time? Our guide on how to use AI to write Excel formulas shows how to get a working SUMIFS or XLOOKUP for your new table.

Common mistakes

  • Letting the AI choose the columns. You get a different table every time and can’t combine batches.
  • Asking it to calculate everything. Have it copy what’s printed. Calculations belong in your spreadsheet, where you can see the formula.
  • Mixing date formats. Always ask for one format plus the date as printed.
  • Uploading forty files at once. The chat limit is 20 files. Work in batches with the same prompt, then merge the CSVs.
  • Trusting a clean-looking table. Neat formatting says nothing about whether a 7 was read as a 1. The check column and the three-row spot-check do.

Which Claude PDF guide do you need?

When it’s the same PDFs every week

If you run this extraction every Monday on the same kind of document, save the prompt somewhere you can paste it from, and keep your column list fixed so every week’s CSV lines up with the last one. When the PDFs arrive by email on a schedule, that’s the point where an automation starts to pay off. Our page on Zapier free plan automation examples is a good place to see what that kind of setup looks like.

If those weekly PDFs are supplier invoices, you can go one step further: our n8n workflow for automatic invoice processing picks them up from Gmail, reads each one into fixed fields, and adds a row to a Google Sheet for you to check.

Would you rather buy a tool than build a workflow? Here is how to choose AI invoice processing software that fits your invoices, and how to test it on a real batch first.

Start with this week’s pile, though. One folder, one prompt, one table. Then decide whether it’s worth automating.

Want a new practical AI workflow like this every week? Join Launchpad.

No password needed – your reset opens instantly.

No password. Just your email, and you’re in.

🇳🇱 Deze pagina in het Nederlands