Skip to content

bankstatementparser-writer-xlsx

bankstatementparser-writer-xlsx writes already-parsed bank-statement records to an Excel .xlsx workbook: a bold header row, one row per transaction, auto-sized columns and an optional Summary sheet. It takes the output of a bankstatementparser parser as a pandas DataFrame, a list of Transaction objects or a list of plain dict records.

Concern How this writer handles it
Input shapes DataFrame (its column order), list[Transaction] (the stable field order), list[dict] (keys in first-seen order)
Amounts Decimal written as a number, so spreadsheets sort and sum it
Dates date and datetime written as native Excel date cells
Layout Bold header, columns auto-sized to the widest cell and capped at 60 characters
Summary An optional mapping written to a second Summary sheet as key/value rows
Errors TypeError for an unsupported container, ValueError for unsupported items or text an .xlsx cannot hold

In this manual

The source, issues and releases live on GitHub; the package is on PyPI.