How to Convert a Scanned PDF to Excel Without Losing Rows or Columns

Convert a Scanned PDF to Excel

The binder clips on our sample invoice cost $0.75 each. Eight packs come to $6.00. When you convert that invoice to Excel, you want the 8, the 0.75, and the 6.00 in three separate cells so you can multiply the first two and check the third. Seeing the right numbers somewhere on the page is only half the job.

We ran the same scanned invoice through three extraction tools. All three kept every item, decimal point, and the $122.55 total. The Poppler workflow was the only one that also produced six consecutive item rows. Here’s how to try the conversion yourself and check whether your spreadsheet is ready to use.

[Download the invoice and test results](invoice-test-kit.zip). The ZIP includes the image-only PDF, an Excel workbook with one tab per tool, and the script used for the comparison.

How to convert a scanned invoice in Excel

If you have Microsoft 365, the quickest way to try this on one invoice is Excel’s Data From Picture feature. This is a separate, no-code option you can compare with our three test outputs.

  1. Open the sample PDF and zoom in until the decimal points are easy to see. Capture the table from Description through Total, keeping all four columns in the picture. Save the capture as a PNG.
  2. Open a blank worksheet in Excel. On Windows, choose Data → From Picture → Picture From File, then select the PNG. If you copied the screenshot, use Picture From Clipboard instead.
  3. Review the preview against the invoice. Start with the binder clips. You should see 8 under Qty, 0.75 under Unit price, and 6.00 under Amount. Check that the two cells between the word Total and 122.55 are empty.
  4. Choose Insert Data. Set the unit-price and amount columns to Number with two decimal places, then save as an Excel workbook. Formatting makes 6 display as 6.00. If the imported value is 600, correct it against the scan first.

Microsoft documents the supported Excel versions and the import steps in its Data From Picture guide.

What happened when we tested three tools?

We created a one-page fictional office-supply invoice and rendered it at 300 dpi. We put that image in a new PDF and verified that the PDF had no extractable text. This simulated a clean, straight scan. The table had four columns, six items, and a total, with no printed gridlines.

We used Tesseract to recognize the text once, then gave Poppler, pdfplumber, and PyMuPDF the same searchable PDF and the same table area. That let us test a specific question: once the digits have been recognized, which workflow puts them back into the right cells?

Extraction workflowItems recoveredColumns in correct orderUnit prices and line amountsGrand totalExtra blank rows
Poppler pdftotext, layout mode6 of 6All 412 of 12 correct$122.550
pdfplumber, text-based table detection6 of 6All 412 of 12 correct$122.557
PyMuPDF, text-based table detection6 of 6All 412 of 12 correct$122.558

Poppler produced the easiest sheet to use on this invoice. Its layout mode returned spaced text. Our script used the positions of the four headings to split each line into cells. That last step mattered on the total line: splitting on spaces alone would have placed 122.55 immediately after “Total,” under Qty.

pdfplumber and PyMuPDF found the columns themselves. Both kept “Binder clips” together as one description. Their drawback showed up when selecting the data in Excel. pdfplumber inserted a blank row between each pair of printed rows. PyMuPDF did the same and left a second blank row just before “Packing tape.” If you start at the header and select only the contiguous block, you can miss the items below it.

The workbook preserves those gaps. All three tabs use the same export rule to turn recognized numbers into numeric cells and display money to two decimal places. No item values were corrected by hand. This single-page result applies to a clean scan with aligned columns. A tilted phone photo or an invoice with descriptions that wrap onto a second line needs its own check.

Three checks before you trust the spreadsheet

Open the Poppler tab to follow these formulas exactly. The header is in row 1, the six items are in rows 2–7, and the printed total is in D8.

What to checkWhat to do in ExcelExpected result
Are all six amounts usable as numbers?Enter =COUNT(D2:D7) in an empty cell.6. A smaller count means at least one amount is missing or stored as text.
Do the values belong to the right item?In E2, enter =ROUND(B2*C2-D2,2) and fill down to E7. Compare the descriptions with the scan.Every difference is 0. The archive box row reads 2 × 18.05 = 36.10.
Does the sheet agree with the printed invoice?Enter =ROUND(SUM(D2:D7)-D8,2) in an empty cell. Check D8 against the original PDF.The difference is 0 and D8 reads 122.55.

On the other two tabs, the blank rows change the cell addresses. Select from the first item amount through the last item amount when building your sum. Leave the printed total outside that range.

If a real invoice has tax, shipping, or a discount, reconcile the line amounts to the subtotal first. Then apply the printed adjustments and check the grand total. If two descriptions have been merged or an item continues on a second line, match each description to its quantity before deleting any rows.

Try your own converter on the same scan

Open sample-invoice.pdf from the download and run it through the converter you normally use. Before fixing anything, count the item rows, compare the two money columns with the PDF, and check which column holds the final amount. Then open conversion-results.xlsx alongside your export.

The quickest spot check is the final line. On this invoice, “Total” belongs in column A, columns B and C should be empty, and 122.55 belongs in D. A converter can read every character correctly and still give you the wrong spreadsheet if it closes those two gaps.

Scroll to Top