Bank Statement Import Fails in Business Central After the Bank Changed Its File Format
How to build a data exchange definition for the new layout, the header, date and culture traps behind a first-line error, and how to test the import without touching live reconciliations.
When the bank changes its statement file, for example from a CAMT XML statement to CSV, Business Central needs a new data exchange definition for the new layout: copy a working Bank Statement Import definition, set the file type, separator, encoding and the number of header lines to skip, define each column, then map columns to the reconciliation line fields. A first-line error almost always means the header row is being read as data or the date format and culture do not match the file. Test in a sandbox or on a test bank account, compare line count and totals with the file, and only then switch the live bank account to the new format.
Why does the bank statement import break when the bank changes its file?
Because Business Central does not read a bank file by guessing. Every bank account points to a bank statement import format, which is a Bank Export/Import Setup entry, which in turn points to a data exchange definition: a precise description of the file type, where the data starts, what each column or XML element is, how dates and amounts are written, and which field on the reconciliation line each value lands in. When the bank moves from a CAMT XML statement to a CSV export, adds a column, renames a header or changes its date format, that description no longer matches and the import stops on the first value it cannot convert.
The fix is not to edit the file by hand every morning. It is a new definition that describes the new layout exactly, tested before the live bank account uses it.
How do you build a data exchange definition for the new CSV layout?
Start from a copy, not from an empty record. An existing Bank Statement Import definition already carries the processing settings Business Central needs to turn imported values into reconciliation lines, so copy or export one that works today and change the parts that describe the file. Then work through the definition from the outside in.
- Header: type Bank Statement Import, file type Variable Text for a CSV (Fixed Text for fixed-width files, XML or JSON for structured files), the column separator the bank uses, the file encoding (UTF-8 and Windows code pages are the usual candidates) and the number of header lines to skip.
- Line definition: one line type for the transactions. If the file has a summary line at the bottom, make sure it is not read as a transaction.
- Column definitions: one per column in the file, in order, with the data type (Date, Decimal, Text), the data format (for example dd.MM.yyyy or yyyy-MM-dd) and the data formatting culture that matches the decimal separator, such as en-US for 1,234.56 and de-DE for 1.234,56.
- Field mapping: map each column to the bank account reconciliation line. Transaction date, statement amount and description are essential; transaction text, related party name, related party bank account and the payment reference are what automatic matching later depends on.
- Amounts: when the bank gives debits and credits in separate columns or with the opposite sign, use a multiplier of -1 or a transformation rule rather than a manual fix after import.
Why does the import fail on the very first line?
A first-line error, often a message that a value cannot be converted or is not a valid date, nearly always comes from one of a handful of traps. Check them in this order before anything else.
| Symptom | Usual cause | Fix in the definition |
|---|---|---|
| Date conversion error on line 1 | The header row is read as data | Set the number of header lines to skip to match the file |
| Date conversion error on every line | Data format does not match, for example dd/MM/yyyy against dd.MM.yyyy | Set the data format on the date column to the exact pattern in the file |
| Amounts ten or a thousand times too big, or a decimal error | Formatting culture uses the other decimal separator | Set the data formatting culture on the amount column |
| Strange characters in descriptions | File encoding differs from the setting | Change the file encoding, often to UTF-8 |
| Every value shifted by one column | A new column was added, or the separator changed | Re-number the column definitions and check the separator |
| Debits imported as credits | The bank signs amounts the other way or splits them | Multiplier of -1 or separate debit and credit mappings |
How do you test the new format without touching live reconciliations?
Keep the live bank account on the old format until the new one is proven. The safest place to test is a sandbox environment copied from production in the Business Central admin center, where you can import, reconcile and even post without consequence. If a sandbox is not available, create a dedicated test bank account in the live company, point only that account at the new format, import into a new reconciliation and delete the reconciliation without posting.
For each sample file, compare four things with the file itself: the number of lines, the total of debits, the total of credits, and the first and last transaction dates. Then open a few lines and check that the description, the related party name and the payment reference landed in the fields automatic matching reads. Getting those fields right is what makes the next step, tuning automatic matching, worthwhile; that tuning is covered on raising bank reconciliation auto-match.
What does the rebuild look like step by step?
A sequence that replaces the broken import with a tested one and switches over cleanly.
| Step | What to do |
|---|---|
| 1. Collect the new file | Get two or three real statement files in the new layout from the bank, including one with a debit, a credit, a long description and a month end date. |
| 2. Copy a working definition | On the Data Exchange Definitions page, copy or export an existing Bank Statement Import definition so the processing settings stay correct, and give the copy a new code. |
| 3. Describe the file | Set the file type (Variable Text for CSV), the column separator, the file encoding and the number of header lines to skip, then add one column definition per column with its data type, data format and formatting culture. |
| 4. Map the fields | Map columns to the bank account reconciliation line: transaction date, amount, description, transaction text, related party name and any reference column, with a multiplier or transformation rule where the bank splits or signs amounts differently. |
| 5. Point a test bank account at it | Create a Bank Export/Import Setup entry for the new definition and select it as the Bank Statement Import Format on a sandbox bank account or a dedicated test bank account. |
| 6. Import and compare | Import each sample file into a new reconciliation, compare line count, total debits, total credits and dates with the file, then delete the test reconciliation without posting. |
| 7. Switch the live bank account | Finish or post any open reconciliation on the old format, change the live bank account to the new import format, and keep the old definition until the first month end on the new one is closed. |
Should you go back to XML, use a bank feed, or keep the CSV?
Ask the bank first whether it still offers a CAMT.053 statement alongside the new CSV. A structured XML statement carries the related party and the remittance reference in defined elements, and Business Central ships a SEPA CAMT import format that many banks fit with little or no change, so when the option exists it is usually the more stable choice. A CSV layout can change whenever the bank redesigns its online banking export.
Automated bank feeds through a bank connectivity service remove the file step entirely and are worth considering when several companies and banks are involved; that route is described on one payment run for several companies and banks. The outgoing payment file is a separate format with its own traps, covered on SEPA payment file rejected by the bank.
When is a definition not enough and an extension is needed?
Most layout changes are handled by configuration alone. An AL extension becomes the better answer when the file needs logic the definition cannot express: one file containing several bank accounts that must be split, a reference buried inside free text that has to be extracted by a rule, multi-line transactions, or a file that must be fetched from an SFTP folder on a schedule. In those cases a small pre-processing codeunit or a custom reading step keeps the definition simple and the import repeatable. That is ordinary Business Central AL development work.
What does Solzet do when a bank statement import breaks in Business Central?
Solzet takes the new bank files, builds and documents the data exchange definition for the new layout, maps the fields automatic matching depends on, tests the import in a sandbox against real statements, and switches the live bank account over at a safe point in the month. Where the file needs logic beyond configuration, we write the AL extension that handles it. Our own senior consultants and AL developers do the work. It is often the first piece of a wider support arrangement for a live system; the service line is Dynamics 365 Business Central.
Organisations that track customers and payments in a CRM but would rather not carry Microsoft licensing for it can choose a custom CRM. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.
What do people ask us?
Why does my Business Central bank statement import fail after the bank changed its file format?
The bank account points to an import format that describes the old file exactly. When the layout, file type, date format or columns change, the data exchange definition no longer matches and the import stops on the first value it cannot convert. Build a new definition for the new layout.
How do I import a CSV bank statement into Business Central?
Create a data exchange definition of type Bank Statement Import with file type Variable Text, set the separator, encoding and header lines to skip, define each column with its data type and format, map the columns to the reconciliation line, then select it as the bank statement import format on the bank account.
Why do I get a date error on the first line of the bank file?
Usually the header row is being read as a transaction because the number of header lines to skip is wrong, or the data format and formatting culture on the date column do not match how the bank writes dates.
Can I test a new bank import format without affecting live reconciliations?
Yes. Test in a sandbox copied from production, or point a dedicated test bank account at the new format, import into a new reconciliation, compare line count and totals with the file, and delete it without posting.
Is a CAMT XML statement better than a CSV file for Business Central?
Often, yes. CAMT.053 carries the related party and reference in defined elements and Business Central ships a SEPA CAMT import format. A CSV layout can change whenever the bank redesigns its export. Ask the bank whether both are offered.
Do I need an extension to import the new bank file?
Usually not. A data exchange definition handles most layouts. An AL extension helps when one file holds several accounts, a reference has to be extracted from free text, or files must be collected automatically from a folder.
Can Solzet fix our bank statement import in Business Central?
Yes. We build and test the data exchange definition for the new layout against your real files in a sandbox, map the fields automatic matching needs, and switch the live bank account over at a safe point in the month.
Where should you go next?
Business Central implementation
Business Central online, AL extensions, integrations, assessment and support.
Raising bank reconciliation auto-match
Payment application rules, text-to-account mapping and reference fields.
SEPA payment file rejected by the bank
The outgoing payment file: pain.001 version and missing fields.
Payment runs across companies and banks
Bank connectivity and dual approval for several companies.
Business Central AL development
Extensions for imports a definition cannot handle alone.
Custom CRM development
CRM built on React, Node.js, PostgreSQL and .NET, without Microsoft licensing.
Which solution is right for your business?
Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.