> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/tasks/pdf-invoices-to-excel.md).

# Extract PDF invoices into an Excel sheet with Duaer

In Duaer, upload a batch of PDF invoices, read their text, let the invoice extraction employee return vendor, amount, tax ID, and date, then export one Excel sheet.
## Build the invoice flow in Duaer

1. Hire the invoice employee: open [Duaer invoice extraction employee](https://hire.duaer.com/invoice-extract/), sign in, hire it on the employee market, and select Copy ID under Hired.
2. Create a digital organization and add [Form Trigger](/build/form-trigger.md). Add one field labelled Invoices, set Element Type to File, turn on Multiple Files, and set Accepted File Types to .pdf.
3. Add a [Code](/build/code.md) node, rename it Split files, and paste the code below. It turns one upload of many PDFs into one item per file, each on data.
4. Add [Extract from File](/build/extract-from-file.md), set Operation to Extract From PDF and Input Binary Field to data. Each invoice text lands in text.
5. Add [Duaer Employee](/build/duaer-employee.md), paste the ID into Position ID, and set Input to {{ $json.text }}.
6. Add [Edit Fields](/build/edit-fields.md), turn on Include Other Input Fields, and add a field file with {{ $('Split files').item.json.fileName }} so each row shows its source file.
7. Add [Convert to File](/build/convert-to-file.md) with Operation Convert to XLSX. All invoices become one sheet on binary.data.

```
const out = [];
for (const item of $input.all()) {
  for (const key of Object.keys(item.binary ?? {})) {
    out.push({
      json: { ...item.json, fileName: item.binary[key].fileName },
      binary: { data: item.binary[key] },
    });
  }
}
return out;
```

## Columns in the Duaer invoice sheet

- vendor: the company name on the invoice.
- amount: a number string; currency: the currency code.
- tax_id, invoice_number, invoice_date (YYYY-MM-DD).
- file: the source PDF name.

Anything missing from the invoice is unknown; the employee does not invent numbers. Each invoice costs 8 credits at the employee price. Refer to [Duaer plans and credits](/manage-cloud/plans.md).

## Send the Excel file

On the Duaer canvas you can download the xlsx from the Convert to File output. To deliver it every run, add [Send Email](/build/send-email.md) with data as the attachment, or upload it with [Google Drive](/build/google-drive.md).

## Duaer online tools

- [PDF table to Excel converter (text PDFs)](https://doc.duaer.com/tools/pdf-table-to-excel.md)
## Questions

### Can Duaer read scanned PDF invoices?

Extract From PDF in Duaer reads only the text layer. A scan or photo has none, so text is empty; run OCR first and pass that text to the invoice employee.

### How much does one invoice cost in Duaer?

The Duaer invoice extraction employee costs 8 credits per successful call, one call per invoice. Reading the PDF and exporting Excel cost nothing.

## Related

- [Call a hired employee with Duaer Employee](https://doc.duaer.com/build/duaer-employee.md)
- [Read a file with Extract from File in Duaer](https://doc.duaer.com/build/extract-from-file.md)
- [Write a file with Convert to File in Duaer](https://doc.duaer.com/build/convert-to-file.md)
- [Merge several Excel files into one sheet with Duaer](https://doc.duaer.com/tasks/merge-excel-files.md)

