On-ramp

From Excel to a validated pain.001 file

The spreadsheet is where the batch starts. One command takes it to a bank-ready, schema-validated pain.001 file.

Most payment batches start life in a spreadsheet. A treasury analyst builds the payroll or the supplier run in Excel, checks it, and then has to get it to the bank as a pain.001 file. The usual bridge is "Save As CSV", and that is where the damage happens: leading zeros vanish, an IBAN typed into a General cell has already been turned into a number, the encoding drifts, and the first sign of any of it is a rejection from the bank days later.

pain001-loader-xlsx removes the bridge. Install it, and pain001 reads the workbook directly.

One command#

pip install pain001 pain001-loader-xlsx

pain001 -t pain.001.001.09 -d payments.xlsx -o out/

The loader registers itself with pain001 at install time; no configuration, no flag. The first worksheet is the batch, row 1 is the header, every row after it is a payment. Column names are the flat-record vocabulary every other pain001 input uses, so a workbook and a CSV describe the same payment the same way.

What it protects you from#

  • Numeric IBANs. If any cell in an IBAN column arrives as a number, the load stops with a clear error naming the row. A debtor account that Excel reformatted is exactly the corruption the bank cannot detect and you cannot afford.
  • Formulas and macros. Formulas resolve to their last-saved values; macros in .xlsm files are never executed. The loader reads, it does not run.
  • Large batches. Workbooks open read-only and stream in fixed-size chunks, so a multi-hundred-thousand-row batch never has to fit in memory.
  • Ambiguity. One sheet, one batch. A workbook with no sheets or no header row is an error, not an empty file.

After the load, every record goes through the same three checks as any other input: the JSON Schema, the rail rulebook you name (SEPA, Faster Payments, CHAPS, ACH and the rest) and the official XSD. Full IBAN checksum validation happens there, so the type guard at load and the mod-97 check after it are two independent layers.

Try it before you install anything#

The browser demo runs the real pain001 library in your browser on a salary batch from the example corpus: the same flat records a workbook produces, validated in three layers, with the ISO 20022 JSON twin beside the XML. Paste your own rows, in the same columns, and break it on purpose; the verdicts are the library's own words. Nothing is uploaded.

What comes next#

When the workbook is the source of truth, the next step is usually to stop retyping it: the same command runs from a scheduler, a REST API or an AI agent, and the LSP server checks a batch inside the editor before anyone runs anything. If your bank's own guideline needs to be applied on top of the public rulebook, that is private profile work, done around the free software rather than inside it.

Loader reference · Technical reference · Example corpus