Extract invoice data from e-invoices as CSV automatically

Extract invoice data as CSV automatically

E-invoices contain all invoice data in structured form - invoice number, amounts, supplier, line items. This how-to shows how Automatic X-Invoice Processor automatically writes this data out as a CSV file: as a continuous invoice journal for Excel, as a line item list or as an import file for a follow-up system.

At a Glance

  • Difficulty: Beginner
  • Time required: about 10 minutes
  • Prerequisites: Automatic X-Invoice Processor installed; a folder where e-invoices arrive
  • Task used: Save extract as CSV

Step 1: Create a profile

  1. Click New profile… in the profile toolbar and enter a name (e.g. “Invoice journal”).
  2. Under Mode, choose the file type of your invoices: Process PDF file (ZUGFeRD) or Process XML file (XRechnung).
  3. Under Monitored folders, add the inbox folder and add a typical invoice under Example invoices.

The basic setup is described in detail in the how-to “Getting started”.


Step 2: Add the “Save extract as CSV” task

Click Add in the task list and choose Save extract as CSV.

Save extract as CSV task with the Storage location, Fields and CSV format tabs

On the Storage location tab, enter the target directory and file name (placeholder support; without input, the original file name with the extension .csv is used).


Step 3: Compose the fields

On the Fields tab you compose the fields to extract - they become the CSV columns in exactly this order:

  1. Via Add you choose from all invoice fields: invoice data (number, date, amounts), seller/buyer, payment data (IBAN, due date), line item fields and file properties.
  2. Use the arrow buttons to change the order.

Header or line item list? If the field selection contains at least one line item field (article, quantity, unit price, …), the program writes one row per invoice line item - the header data (invoice number etc.) is repeated in every row. Without line item fields, exactly one row per invoice is written.


Step 4: Define the CSV format

On the CSV format tab:

Setting Recommendation
CSV collective file Enable for a continuous journal: all invoices are appended to ONE file; an automatic backup copy (.bak) protects the file against corruption
CSV column headers Enable so the field names appear as the first row (for the collective file only when it is created)
CSV delimiter Leave empty = the system’s list separator (directly Excel-compatible)
Encoding / Code page UTF-8, unless the target system expects otherwise

Tip - monthly journal: With date placeholders in the file name (e.g. Invoice journal <InvoiceYear>-<InvoiceMonth>), combined with the collective file, one CSV per month is created automatically.


Step 5: Verify and save

  1. Check the target path of the CSV file in the result preview (see chapter 8.11).
  2. Click OK and place an invoice into the monitored folder - or click Check now in the status bar.
  3. Open the generated CSV file in Excel and verify columns and values.

Good to know

  • Combine Save extract as CSV with Move file: first write the data to the journal, then move the original to the archive - this is exactly how the demo profiles work (see chapter 50.3).
  • Amounts are written with two decimal places; the decimal separator follows the system setting.
  • For transferring invoices into a SQL Server database there is the dedicated Save to database task (see chapter 13 and the how-to “Save invoices to a SQL Server database”).

Common issues

Issue Solution
Excel shows all values in one column Check the delimiter - leave it empty so the system’s list separator is used
Special characters appear wrong Set the encoding to UTF-8 or adapt it to the target system
Collective file contains duplicate headers CSV column headers writes only when the collective file is created - duplicate rows come from a manually edited file

Further reading

Start your no-obligation, 30-day free trial of Automatic X-Invoice Processor now ...     Download