# PDF Invoice Line Items to Excel, Header Fields Too

- Author: FastBankConvert (https://fastbankconvert.com)
- Published: 2026-10-17
- Category: Other financial documents
- Canonical: https://fastbankconvert.com/blog/pdf-invoice-line-items-to-excel

> Get PDF invoice line items to Excel with quantities, unit prices and amounts, plus header fields such as invoice number, date, tax and total.
To move PDF invoice line items to Excel, extract the item table as rows (description, quantity, unit price, amount) and copy the header fields, such as invoice number, date and supplier, onto every row. Then put discounts, freight and tax in rows of their own, and check that the lines plus tax equal the printed invoice total.

## Invoice header fields versus invoice line items

An invoice holds two kinds of data. Header fields appear once per invoice: supplier, invoice number, invoice date, due date, purchase order number, currency and the totals box. Line items repeat: one row for each product or service billed. In Excel, line items become rows, and header fields become columns repeated on each row.

### Why repeat the header on every row

It feels wasteful to type the same invoice number ten times. It is what makes the sheet usable. A pivot table, a filter or a SUMIFS formula only sees the row it is working on. If the invoice number sits in a cell above the table, a filter on "widgets" loses track of which invoice each widget came from. Repeating the header fields turns the sheet into a flat list, and a flat list can be sorted, filtered and combined with next month's list without breaking.

### Fields to capture from the header

The header usually gives you more than you need. A practical set:

- **Supplier name**, as printed, so two suppliers with similar products stay apart.
- **Invoice number**, stored as text. Invoice numbers like 000417 lose their leading zeros if Excel treats them as numbers.
- **Invoice date** and, if you track payables, the **due date**.
- **PO number**, when the supplier prints one, so the invoice can be matched to an order.
- **Currency**, if you buy from more than one country.
- **Subtotal, tax and total**, read from the totals box, used later to check the lines.

The totals belong in the header group even though they print at the bottom. They describe the whole invoice, not a single line.

## Which columns should an invoice line item sheet have?

A useful invoice line item sheet needs the repeated header columns, then a line number, item code if printed, description, quantity, unit, unit price and line amount. That set is enough to total by supplier, by product or by month, and to check that quantity times unit price equals the amount on each line.

### A column layout that works

| Column | Example value | Type |
| --- | --- | --- |
| Supplier | Example Paper Co | Text |
| Invoice no | INV-20417 | Text |
| Invoice date | 2026-09-03 | Date |
| Line | 1 | Number |
| Item code | A4-80-BOX | Text |
| Description | A4 copy paper, 80 gsm, box of 5 reams | Text |
| Qty | 4 | Number |
| Unit | box | Text |
| Unit price | 21.50 | Number |
| Amount | 86.00 | Number |
| Line type | item | Text |

The values above are examples. The last column, line type, is the one people skip and later miss. It labels each row as item, discount, freight or tax, so a sum of the Amount column can be split into "goods" and "everything else" with one filter.

### Item codes stored as text

Item codes and invoice numbers should be text columns before any data lands in them. Codes such as 1E5 or 3-10 look like numbers or dates to Excel, which turns 1E5 into 100000 and 3-10 into the 10th of March. Format the column as Text first, or import through a step that lets you set the column type.

### A quick per-line check

Add a helper column with the formula `=ROUND(G2*I2,2)-J2`. It should be zero on every item line. A non-zero result means one of three things: the supplier rounds differently, a quantity was misread, or two numbers from neighbouring columns ran together during extraction. All three are worth knowing before the data goes anywhere else.

## Invoice line items that wrap or run across pages

Long descriptions wrap onto a second printed line, and long invoices continue the item table on the next page. Both break a naive extraction. A wrapped line becomes an extra row with no quantity or amount, and a page break drops repeated headings and footers into the item rows.

### Joining wrapped description lines

The pattern is easy to spot once you sort by nothing and just read down the sheet: a row with text in Description and blanks in Qty, Unit price and Amount sits directly under a normal row. That blank row is the second half of the description above it. Join it to the row above, then delete it. Do this before you sort, because sorting separates the two halves and the link between them is gone.

### Cleaning page breaks

Each new page of an invoice can repeat the column headings, and the old page ends with a footer such as "Page 1 of 3" or "Continued on next page". After extraction, filter the Description column for the heading text ("Description") and for "Page" and "Continued". Delete those rows. Some suppliers also print a running subtotal at the foot of each page, "Carried forward" or "Balance c/f". Delete it too, or it will be counted twice when you total the lines.

### Highlighted or marked-up invoices

Sometimes the invoice you receive has been marked up by a colleague, with disputed lines highlighted for follow-up. If you only want those lines, [pulling highlighted text from a PDF into Excel rows](/blog/extract-highlighted-text-from-pdf-to-excel) explains how annotations are stored and how to export just the marked items.

## Discount, freight and tax lines on a PDF invoice

Not every line on an invoice is a product. Discounts, freight, handling fees, deposits and tax all print in or under the item table. Give each its own row with a line type, and enter discounts as negative amounts. Kept that way, the item rows total to the goods value and the full column totals to the invoice.

### Where these lines appear

Suppliers place them differently:

- **Inside the item table**, as a line such as "Freight" or "Early payment discount 2%" with an amount but no quantity.
- **Under the table**, in the totals box: subtotal, discount, shipping, tax, total.
- **Per line**, as a tax column or a discount column next to each item's amount.

The first two become their own rows. The third becomes extra columns on each item row, such as Tax rate and Tax amount, because the tax belongs to that line.

### Tax shown per line or once

When tax is printed once for the whole invoice, add a single row with line type "tax" and the printed tax amount. Do not try to spread it over the items unless you need tax per product, and if you do, keep the printed figure as the total you check against. Spreading creates rounding pennies that will never quite match the supplier's number.

### Credit notes

A credit note looks like an invoice but reduces what you owe. Keep it in the same sheet with its own document type column, and enter its amounts as negatives. If you list credit notes as positive numbers in a separate tab, every supplier total you build later will be overstated.

## Do the extracted invoice line items add up to the invoice total?

Extracted invoice line items should add up exactly to the printed total once discounts, freight and tax rows are included. Check every invoice this way: sum the Amount column per invoice number and compare it with the total read from the header. A gap means a line was missed, doubled or misread.

### Worked example: one invoice, as printed and as rows

The invoice below is an example. As printed, the item table and totals box read:

| Description | Qty | Unit price | Amount |
| --- | --- | --- | --- |
| A4 copy paper, 80 gsm, box of 5 reams | 4 | 21.50 | 86.00 |
| Toner cartridge, black | 2 | 64.00 | 128.00 |
| Desk organiser | 1 | 18.75 | 18.75 |
| | | Subtotal | 232.75 |
| | | Delivery | 9.50 |
| | | Tax 8% (on goods and delivery) | 19.38 |
| | | Total | 261.63 |

As Excel rows, with the header fields repeated:

| Invoice no | Date | Line type | Description | Amount |
| --- | --- | --- | --- | --- |
| INV-20417 | 2026-09-03 | item | A4 copy paper, 80 gsm, box of 5 reams | 86.00 |
| INV-20417 | 2026-09-03 | item | Toner cartridge, black | 128.00 |
| INV-20417 | 2026-09-03 | item | Desk organiser | 18.75 |
| INV-20417 | 2026-09-03 | freight | Delivery | 9.50 |
| INV-20417 | 2026-09-03 | tax | Tax 8% on 242.25 | 19.38 |

Note that the subtotal and total rows are not in the line sheet. They are header values. The check is `=SUMIFS(Amount, InvoiceNo, "INV-20417")`, which returns 261.63, the same as the printed total.

### Reading a gap

When the sum and the printed total disagree, the size of the gap is a clue. A gap equal to one line's amount means that line was dropped. A gap equal to the subtotal means the subtotal row slipped into the line sheet. A gap of a few cents usually comes from the supplier rounding tax per line while you entered it once. A gap that is a large, oddly specific number often means two figures merged, such as a quantity of 2 fused onto 64.00 to make 264.00.

### Build the check into the sheet

Keep a second tab with one row per invoice: invoice number, printed total and the SUMIFS of its lines, with a difference column. Conditional formatting on the difference column turns every invoice that does not tie red. That list is your review queue.

## Invoices from many suppliers in one invoice sheet

Invoices from different suppliers rarely share a layout. One puts the quantity first, another prints the unit price after the amount, a third adds a discount column. Extract each supplier's invoices into the same target columns in the same order, and the stacked sheet works. Map columns by meaning, never by position on the page.

### A mapping row per supplier

Keep a small table that records, for each supplier, which printed heading feeds which of your columns. "Qty", "Quantity" and "Units" all map to Qty. "Ext price", "Line total" and "Amount" all map to Amount. When a new invoice arrives from a known supplier, the mapping already exists, and the extraction lands in the right columns without rethinking it each month.

### Paper and photographed invoices

A scanned or photographed invoice has no text inside the PDF, only an image, so everything above depends on text recognition first. Digits are the weak point, and invoice numbers and amounts are mostly digits. [Turning paper invoices into rows with a scanner](/blog/scan-invoice-to-excel) covers resolution, layout and the recognition errors to look for. If the paper you are scanning is cheques paid against those invoices, [scanning checks into Excel by payee, amount and check number](/blog/scan-checks-into-excel) handles that layout.

### When a PDF is the wrong starting point

If an invoice also came as an e-invoice file, a CSV export from the supplier's portal or an entry in your accounting system, use that instead. Structured data needs no extraction and carries no reading errors. Extract from the PDF when it is the only copy, or when you need the figures exactly as the supplier printed them for an audit trail.

### Statements next to invoices

Invoices are half the picture. The bank statement shows when each one was paid. FastBankConvert is being built for that other half: a bank statement PDF in, Excel or CSV out, with a warning if the balances do not add up. It is getting ready to open, and you can [sign up on the get-started page](/get-started) to hear when it does.
