Sparkasse & UBS Kontoauszug PDF in DATEV EXTF & MT940: Warum Buchungsimporte still fehlschlagen (MIT CLI Validator)
Wer im DACH-Raum ( Deutschland, Schweiz, Österreich ) Kontoauszüge von Sparkasse, Volksbank, Commerzbank, DKB, UBS oder PostFinance in DATEV Unternehmen online, Lexoffice, Bexio oder Abacus importiert, kennt das Frust-Muster: Die CSV- oder .sta -Datei sieht optisch sauber aus — beim Import bricht DATEV jedoch ab, oder Bexio meldet eine mysteriöse Cent-Differenz. Aus technischer Sicht sind fast…
In the DACH region (Germany, Switzerland, Austria), account extracts from banks like Sparkasse, Volksbank, Commerzbank, DKB, UBS, and PostFinance are often imported into financial management software such as DATEV, Lexoffice, Bexio, or Abacus. However, users frequently encounter issues during the import process. The problem stems from five common format and calculation errors:
1. DATEV EXTF format: Positive amounts use a strict "S" for debit and "H" for credit, while negative amounts should not contain a minus sign or decimal point. For example, -1245.50 is incorrect, while 1245,50;S or 1245,50;H is correct. DATEV has three strict rules: the first line must be the valid EXTF header, semicolon (;) must be used as the separator, the date must be in the format TTMM (e.g., 0310 for the 3rd of October), and the transaction text must not exceed 60 characters. It must also be protected against Excel formula injection (CWE-1236).
2. Switzerland (Bexio / Abacus): Swiss bank PDFs from UBS, PostFinance, and Raiffeisen use the apostrophe as the thousand separator (e.g., 12'450.50). Many converters write the apostrophe or decimal point directly into the MT940 fields (60F:, 61:, 62F:). The SWIFT MT940 standard, however, only accepts a comma without a thousand separator (12450,50).
3. The prohibition of floating-point numbers in bank reconciliations: IEEE 754 floating-point numbers generate rounding errors (e.g., 0.1 + 0.2 != 0.3). A reliable conversion pipeline must use whole cents (or Python's decimal.Decimal) to prove mathematical continuity. A discrepancy of even 0.01 EUR or 0.01 CHF is often due to an overlooked extra line at the end of the PDF.
4. Offline validation before importing into DATEV or Bexio: The open-source validator bank-statement-spec can check DATEV EXTF and MT940 files locally in the terminal without uploading any data. Users can check datev files with the command "bank-statement-spec --format datev kontoauszug_datev.csv" and mt940 files with "bank-statement-spec --format mt940 ubs_oktober.sta". The same applies for Node.js users using "npx bank-statement-spec ubs_oktober.sta".
5. Online validation without installation: A browser-based validator allows users to check account extracts directly from PDFs, scans, or kassenbons. The validator works entirely locally in JavaScript with zero data upload: https://stmtverify.com/tools/accounting-file-validator and https://stmtverify.com/tools/mt940-to-excel. For SWIFT MT940 ( .sta ) files, users can view and convert them directly in the browser: https://stmtverify.com/tools/mt940-to-excel.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to
More from Dev.to on urgent.news
Report a problem with this story
Get the day's news by email. Daily, weekly or monthly. Sign up