Manual
eInvoice Viewer — ExporterInstall, work, configure
invoicePress / Manuals / eInvoice Viewer — Exporter

eInvoice Viewer — Exporter – Manual

Applies to version 1.10.1. As of 17.10.2026.

1 · Overview

The eInvoice Viewer — Exporter is an add-on for the WordPress plugin eInvoice Viewer for PEPPOL & EN16931. It adds an "Export to Excel" button to the viewer's result view. A click on this button turns the invoice the viewer currently has open into an Excel file. The Exporter does nothing more: it brings no shortcode and no upload field of its own.

The Exporter is meant for everyone who wants to reuse the details of an e-invoice in a spreadsheet, for example to file, compare, pass on or check them field by field.

What the Exporter does:

  • It fills a prepared Excel template containing the EN 16931 field catalogue with the values of the open invoice. Every field has its own block of rows in the template.
  • It reproduces repeated groups as often as they occur in the invoice. This applies for example to free texts (BG-1), invoice lines (BG-25) and allowances per line (BG-27). An invoice with five lines gets five line blocks.
  • It leaves out a group that does not occur in the invoice entirely, instead of showing an empty placeholder block.
  • It chooses the template by the language of the view: German, English or French.
  • It uses exactly the invoice data the viewer has already read. The XML file is not read a second time, so the export cannot differ from what the viewer shows.
  • It limits the number of exports per visitor and calendar day.

What the Exporter does not do:

  • It does not read the invoice itself. Without the viewer it does nothing.
  • It does not convert an invoice between UBL and CII and does not offer such a conversion for download.
  • It does not export to DATEV or any other accounting format.
  • It does not yet export the additional fields of the EXTENDED profile (ZUGFeRD Extended, Factur-X Extended). Every export uses the template for the EN 16931 core.
  • The field names in the English and the French template are still German.
  • It adds no REST route to your site.

Requirements:

WhatRequirement
WordPressversion 5.8 or newer; tested up to version 7.1
PHPversion 8.2 or newer
Required plugineInvoice Viewer for PEPPOL & EN16931, installed and active
To open the resulta program that opens files in the .xlsx format
LicenceGPL-2.0-or-later; the bundled Excel library PhpSpreadsheet is under the MIT licence
Screenshot missingscreenshots/ex-knopf.en.pngThe viewer's result view with an open sample invoice; the button "Export to Excel" is highlighted
The viewer's result view with an open sample invoice; the button "Export to Excel" is highlighted

2 · Installation

The Exporter is a paid product. You receive it as a ZIP file from the shop on invoicePress.de. There are two ways to install it.

Option A: upload the ZIP file in WordPress

Option B: put the folder on the server

Note: The Exporter names the viewer as a required plugin in its plugin header. So always install and activate the viewer first.

Updating

You get the new version as a ZIP file from the shop and install it over the existing version as in option A, or you replace the plugin folder on the server as in option B. Your three settings are stored in the WordPress database and not in the plugin folder; they are kept when the folder is replaced. WordPress does not announce a new version by itself, because the plugin brings no update check of its own.

Removing

You deactivate and delete the plugin on the Plugins page. The button then disappears from the viewer's result view. The Exporter creates no tables of its own and stores no invoices. The database holds only the two settings spvx_daily_limit and spvx_trust_proxy and the short-lived counters of the daily limit. The plugin does not clean up on deletion: the two settings stay in the database. The daily limit counters expire by themselves after one day.

3 · First steps

Screenshot missingscreenshots/ex-knopf.en.pngThe viewer's result view with an open sample invoice; the button "Export to Excel" is highlighted
The viewer's result view with an open sample invoice; the button "Export to Excel" is highlighted
Screenshot missingscreenshots/ex-excel-ergebnis.en.pngThe downloaded Excel file, opened in the spreadsheet program: the EN 16931 field catalogue with the values of the sample invoice entered
The downloaded Excel file, opened in the spreadsheet program: the EN 16931 field catalogue with the values of the sample invoice entered

Tip: After installation there is nothing to set up to get started. The button appears by itself as soon as both plugins are active.

4 · Working with the Exporter

Exporting an invoice to Excel

You open an invoice in the viewer and click "Export to Excel". The viewer passes the invoice data it has already read to your WordPress server. There the Exporter fills the template and sends the finished file straight back as a download. The invoice is not uploaded a second time and not read a second time for this. For you this means: the Excel file holds the same values you see in the viewer.

The structure of the Excel file

The file is a filled-in template with the EN 16931 field catalogue. Every field of the standard has its own block of rows in it, into which the value from the invoice is entered. The template's cell formats are kept in the result. A total the invoice does not state stays empty and is not filled with 0.00. If a party carries both a simple and a global identifier, both stand separately in their own fields. Tender reference and object identifier stand in rows of their own.

Screenshot missingscreenshots/ex-excel-ergebnis.en.pngThe downloaded Excel file, opened in the spreadsheet program: the EN 16931 field catalogue with the values of the sample invoice entered
The downloaded Excel file, opened in the spreadsheet program: the EN 16931 field catalogue with the values of the sample invoice entered

Repeated groups: as often as they occur

Some groups of the standard may occur several times in an invoice, such as free texts (BG-1), invoice lines (BG-25) and allowances per line (BG-27). The Exporter repeats the block of rows of such a group exactly as often as the group stands in the invoice. An invoice with five lines gets five line blocks. A group with zero occurrences is left out. The allowances and charges of an invoice line form one full-width table per line.

Screenshot missingscreenshots/ex-positionen.en.pngExcerpt of the Excel file with several consecutive line blocks of a sample invoice, one block per line
Excerpt of the Excel file with several consecutive line blocks of a sample invoice, one block per line

The language of the template

The Exporter uses the German, the English or the French template, depending on the language the viewer's view runs in. For any other language it takes the German template. The field names in the English and the French template are still German.

Screenshot missingscreenshots/ex-sprache.en.pngThe same sample invoice, exported from an English view: the English template, in which the field names are still German
The same sample invoice, exported from an English view: the English template, in which the field names are still German

The name of the downloaded file

The file name is made of the name of the invoice file without its extension and the suffix -export.xlsx. So invoice-4711.xml becomes invoice-4711-export.xlsx. If no name is known, the file is called invoice-export.xlsx.

The daily limit

The Exporter counts the successful exports per visitor and calendar day. Logged-in users are counted by user, visitors who are not logged in by IP address, which is used only as a hash value for this. When the limit is reached, the server refuses further exports for that day. An export that fails is not counted. You set the limit in the settings; the value 0 lifts it.

Switching it off on one page

In the shortcode of the viewer you switch off on a single page what this add-on shows, for example [spev_einvoice_viewer button_spev_export="no"]. Without the attribute everything stays on.

SwitchWhat the page leaves out
button_spev_exportthe button "Export to Excel"

A switch only takes something off this page. Who may use the add-on at all is set with "Available from role" in the settings of the viewer.

5 · Settings

The Exporter has no settings page and no menu item of its own. Its settings stand as an additional section on the viewer's settings page.

eInvoice Viewer → Viewer, section "eInvoice Viewer — Exporter"

The section begins with the sentence "Adds a "Export to Excel" button to the eInvoice Viewer's ( … ) result - no shortcode of its own." and a status line below it. In green it reads "eInvoice Viewer for PEPPOL & EN16931 is active - the button will appear." In red it begins "eInvoice Viewer for PEPPOL & EN16931 is not active." and adds that this plugin reuses the viewer's reading logic and does nothing without it.

SettingDefaultEffect
Daily exports per visitor20Maximum number of exports per calendar day. Below the field it says: "Per calendar day. Logged-in users are counted by user, anonymous users by IP address. 0 = unlimited." Negative entries are stored as 0.
Trust proxy headeroffWhen switched on, the Exporter takes the visitor's IP address from the header X-Forwarded-For. Next to the box it says: "Use the X-Forwarded-For header for the client IP ( only enable behind a trusted reverse proxy )."
Screenshot missingscreenshots/ex-einstellungen.en.pngThe page eInvoice Viewer → Viewer with the section "eInvoice Viewer — Exporter": green status line and the two settings with their defaults
The page eInvoice Viewer → Viewer with the section "eInvoice Viewer — Exporter": green status line and the two settings with their defaults

Caution: Do not switch on "Trust proxy header" without a reverse proxy. Otherwise the visitor can set the header X-Forwarded-For themselves, and the daily limit could be bypassed.

Shortcodes

The Exporter has no shortcode of its own. The button appears wherever the viewer is embedded with its shortcode:

[spev_einvoice_viewer]

6 · Special cases

You want to open the export to only a few uses a day. Enter a small number under "Daily exports per visitor", for example 3. Each visitor can then export at most three invoices on one calendar day.

You want to offer the export without a limit. Enter the value 0 under "Daily exports per visitor". This makes sense, for example, on an intranet page that only your own people reach.

Your site runs behind a reverse proxy. Without further setup WordPress sees the proxy's address for all visitors, and all visitors who are not logged in then share one common daily limit. Switch on "Trust proxy header". The Exporter then counts the address the proxy appended to the header X-Forwarded-For, and not one the visitor wrote into it themselves.

Your page is delivered from a cache. The Exporter provides the security token for the export freshly through a request of its own, so that the export also works on a cached page. If the message that the security check failed appears anyway, reload the page.

You export an invoice in the EXTENDED profile. The export works but uses the template for the EN 16931 core. The core fields are complete in the file; the additional fields of the EXTENDED profile are missing.

You run the viewer in English or French. The Exporter takes the English or French template by itself. Expect the field names in it to be still German.

7 · Working with other packages

PackageCooperationWhat is added
eInvoice Viewer for PEPPOL & EN16931Required. The viewer reads the invoice, shows the button and provides its settings page.Without it the Exporter does nothing.
eInvoice Viewer — Extended ProfilesShows the additional fields of the EXTENDED profile in the viewer.Nothing is added for the export: the Excel file still contains only the core fields.
Further viewer add-onsThe daily limit works by the same procedure as in the other plugins of the family.The Exporter keeps its own counter and its own settings.

8 · Troubleshooting

The messages appear in the language of the site; the table gives the English wording. If no message comes from the server, the viewer shows that the export failed and asks you to try again.

SignCauseRemedy
The button "Export to Excel" does not appear.The viewer or the Exporter is not active.Check both on the Plugins page. The status line under eInvoice Viewer → Viewer shows whether the viewer is recognised.
The section "eInvoice Viewer — Exporter" is missing in the settings.The section hangs on the viewer's settings page. Without the viewer there is no page for it.Activate the viewer.
"Security check failed. Please reload the page."The page's security token has expired or is invalid.Reload the page and export again.
"You have reached the daily export limit. Please try again tomorrow."The daily limit for this visitor is reached.Wait until the next calendar day, or raise "Daily exports per visitor".
"No invoice model received." or "The invoice model could not be read. Please try again."The invoice data did not reach the server, or only partly.Open the invoice in the viewer again and export once more.
The export stops with a technical message.An error occurred while filling the template.Note the message and the invoice and contact invoicePress.
All visitors who are not logged in reach the daily limit together.The site runs behind a reverse proxy, and all visitors appear with the same address.Switch on "Trust proxy header".
The field names in the English or French file are German.That is the state of this version.None; the values are not affected.
Fields of the EXTENDED profile are missing in the file.The export uses the core template.None in this version.
The plugin's texts appear in English on a German site.An older version when network-activated or on an older WordPress.Update to version 1.10.0.

9 · Privacy and security

What goes to the server. On a click on "Export to Excel" the browser sends the invoice data already read, the name of the invoice file and the language of the view to your own WordPress server. At this moment the invoice data thus leave the browser. The only recipient is the WordPress installation on which the Exporter runs.

What does not go outside. The export runs entirely on your own server. The Exporter makes no outgoing requests and uses no outside service.

What is stored. The invoice data passed and the Excel file produced exist only for the duration of the request. Nothing of it is written into the media library or the database. Only the three settings and the daily limit counters are stored. The counters are short-lived entries (transients) in WordPress; for visitors who are not logged in they refer to the hash value of the IP address, for logged-in ones to the user.

How the export is protected.

  • The export can only be reached through an AJAX action within your WordPress installation that requires a valid security token (nonce). There is no REST route.
  • The daily limit restricts the number of exports per visitor.

Note: The viewer usually runs on public pages. That is why visitors who are not logged in can export too. The daily limit is the means by which you restrict this use.

10 · For developers

KindNameMeaning
ConstantSPVX_VERSIONVersion of the plugin, here 1.10.0
ConstantsSPVX_FILE, SPVX_DIR, SPVX_URLMain file, directory and URL of the plugin
Optionspvx_daily_limitInteger, default 20; 0 = unlimited
Optionspvx_trust_proxyBoolean, default off
Viewer actionspev_register_settingsThe Exporter hooks its settings section to this action; it passes the viewer's settings group and page.
AJAX actionspvx_nonceReturns a fresh nonce for the action spvx_export.
AJAX actionspvx_exportExport from the invoice model; the button uses this way. POST fields: nonce, model (JSON, must contain sections), filename, lang (de, en or fr; otherwise de).
Text domaineinvoice-viewer-exporterTranslations in the folder /languages

All three AJAX actions are also registered for visitors who are not logged in. On success the two export actions answer not with JSON but directly with the file (Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, as an attachment). On error they answer with JSON and one of these status codes: 400 (no or unreadable data), 403 (invalid nonce), 413 (file too large), 415 (wrong file type), 422 (error reading or filling), 429 (daily limit reached), 500 (reading library missing).

The templates are in the plugin folder under templates/ and are called EN16931-DE.xlsx, EN16931-EN.xlsx and EN16931-FR.xlsx. The Excel file is written by the library PhpOffice/PhpSpreadsheet (MIT). The library horstoeko/zugferdublbridge (MIT) lets the file-based way read a UBL invoice on the server. The Exporter offers no filters and no actions of its own.

11 · Versions

1.10.0

  • The conversion between UBL and CII for download is removed; the Exporter now only turns the invoice into an Excel file.
  • Invoices naming XRechnung 4.0 or EN 16931-1:2026 can now be opened and show their identifier.
  • The note above the marked fields now says exactly what the viewer checks.
  • The bundled translations now also appear when the plugin is network-activated and on older WordPress versions.

1.9.2

  • The exemption reason of a UBL invoice and its code are no longer lost in the Excel export.

1.9.1

  • UBL invoices following the country adaptations for Portugal (CIUS-PT) and Romania (CIUS-RO) are now read.

1.9.0

  • Tender reference and object identifier are exported in rows of their own.
  • Behind a reverse proxy, the access limit counts the address the proxy appended and no longer the one the visitor wrote themselves.
  • The package no longer lacks a file of a bundled library, so the plugin can read invoices on the server again.

1.8.2

  • Totals the invoice does not state are exported empty instead of 0.00.
  • German translation completed.

1.8.0 and 1.7.0

  • The allowances and charges of an invoice line form one full-width table per line; the areas for allowances and charges are no longer missing for an invoice or line without them.

1.5.0

  • The export uses the German, English or French template depending on the language of the view.

1.4.0

  • The export no longer uploads the invoice a second time.

1.0.0

  • First version: button "Export to Excel" in the viewer's result view, EN 16931 core template in German, repeated groups once per occurrence.

12 · List of images

This list shows which screenshots this manual expects and which were found in the folder screenshots/ of the package. An image is always named key.language.png, for example ex-knopf.en.png. The images show sample data only.

StatusFileWhat it shows
–ex-knopf.en.pngThe viewer's result view with an open sample invoice; the button "Export to Excel" is highlighted
–ex-knopf.en.pngThe viewer's result view with an open sample invoice; the button "Export to Excel" is highlighted
–ex-excel-ergebnis.en.pngThe downloaded Excel file, opened in the spreadsheet program: the EN 16931 field catalogue with the values of the sample invoice entered
–ex-excel-ergebnis.en.pngThe downloaded Excel file, opened in the spreadsheet program: the EN 16931 field catalogue with the values of the sample invoice entered
–ex-positionen.en.pngExcerpt of the Excel file with several consecutive line blocks of a sample invoice, one block per line
–ex-sprache.en.pngThe same sample invoice, exported from an English view: the English template, in which the field names are still German
–ex-einstellungen.en.pngThe page eInvoice Viewer → Viewer with the section "eInvoice Viewer — Exporter": green status line and the two settings with their defaults