AI table extraction can drop a row or merge two rows into one, and a missing row changes the total. Counting rows in the original and in the extraction takes a minute and catches the most common error. Copilot in Excel and Gemini in Google Sheets can both build tables from data, but neither checks the row count for you.
Checked on 2026-11-29. We did not run any tool for this guide. Every result below is an expected result, marked UNTESTED, for you to confirm on your own files.
Prerequisites
- The original invoice, as a PDF or image
- The extracted table in a spreadsheet
- A calculator or a spreadsheet SUM formula
Steps
1. Count the rows in the original
Count the item rows in the invoice, ignoring the header and the total row.
Expected result: A row count exists for the original, for example 6 rows.
2. Count the rows in the extraction
Count the item rows in the extracted table the same way.
Expected result: A row count exists for the extraction.
3. Compare the two counts
If the counts differ, find which row is missing or merged before you check any figures.
Expected result: The counts match, or the missing row is named.
4. Check the total only after the counts match
Add the extracted amounts and compare with the invoice total.
Expected result: The extracted total matches the invoice total.
Worked example
A practice invoice has 4 item rows. The extraction first returned 3 rows and missed one.
| Item | Quantity | Amount |
|---|---|---|
| Paper reams | 10 | 42.50 |
| Pens, box of 12 | 5 | 18.75 |
| Folders | 8 | 24.00 |
| Stapler | 2 | 15.90 |
| Totals | 25 | 101.15 |
Expected result: Four rows are counted in the invoice and four in the extraction, and the amounts total 101.15, matching the invoice (UNTESTED – confirm it yourself.)
Verdict table
| Check | Expected result | Pass? |
|---|---|---|
| Count the rows in the original | A row count exists for the original, for example 6 rows. | – |
| Count the rows in the extraction | A row count exists for the extraction. | – |
| Compare the two counts | The counts match, or the missing row is named. | – |
| Check the total only after the counts match | The extracted total matches the invoice total. | – |
Limits
- A matching row count does not prove every figure is right; check a sample of amounts too.
- Merged cells and wrapped rows can make counting hard; count by item name, not by lines.
Sources
- How to Use AI in Excel and Google Sheets – checked 2026-11-29
- How to Use AI to Create Spreadsheet Formulas in Excel and Google Sheets – checked 2026-11-29
