Metadata-Version: 2.4
Name: coda-to-excel
Version: 0.1.0
Summary: Parse Belgian Febelfin CODA 2.6 bank statement files (.cod, .coda) offline into Python dicts, CSV, Xero CSV, QuickBooks CSV or JSON with balance checks.
License-Expression: MIT
Project-URL: Homepage, https://radarbg.com/instant/coda-to-excel?ref=pypi-coda
Project-URL: CODA to Excel online, https://radarbg.com/instant/coda-to-excel?ref=pypi-coda
Project-URL: CAMT.053 & MT940 Converter, https://radarbg.com/instant/camt053-to-excel?ref=pypi-coda
Project-URL: PDF Bank Statement to Excel, https://radarbg.com/instant/bank-statement-pdf-to-excel?ref=pypi-coda
Keywords: coda,febelfin,belgium,bank-statement,accounting,csv,excel,xero,quickbooks,parser
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial :: Accounting
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# coda-to-excel

Parse **Belgian Febelfin CODA 2.6 bank statement files** (`.cod`, `.coda`) offline into clean Python dicts, CSV, Xero CSV, QuickBooks/Sage CSV, or JSON — with automatic Belgian structured communication (`+++xxx/xxxx/xxxxx+++`) decoding and opening/closing balance verification.

Works with CODA files from **KBC, BNP Paribas Fortis, Belfius, ING Belgium**, and any bank following the Febelfin CODA 2.6 specification.

- **Pure Python, standard library only** (Python 3.8+, zero dependencies)
- **100% offline** — nothing uploaded, no network calls
- Parses 128-character fixed-width records (`0`, `1`, `21`, `22`, `23`, `31`/`32`/`33`, `8`, `9`)
- Extracts counterparty IBAN & name, value/booking dates, and Belgian structured references (`+++123/4567/89012+++`)
- Verifies `old_balance + sum(movements) == new_balance`

> **Need Excel (`.xlsx`) without installing Python?**
> Convert CODA files directly in your browser (including multi-file `.zip` batches and Excel `.xlsx` with a Summary sheet):
> **[https://radarbg.com/instant/coda-to-excel](https://radarbg.com/instant/coda-to-excel?ref=pypi-coda)**

## Install

```bash
pip install coda-to-excel
```

## Python usage

```python
import coda_to_excel as coda

accounts = coda.parse_file("statement.cod")
for acct in accounts:
    print(acct["account"], acct["currency"], acct["balance_ok"])
    for tx in acct["transactions"]:
        print(tx["date"], tx["counterparty"], tx["amount"], tx["description"], tx["balance"])

csv_text = coda.to_csv(accounts)
xero_csv = coda.to_xero_csv(accounts)
json_text = coda.to_json(accounts)
```

## Command line

```bash
# Convert a Belgian CODA file to standard CSV (Excel-ready)
coda-to-excel statement.cod -o statement.csv

# Export for Xero, QuickBooks Online / Sage, or JSON
coda-to-excel statement.cod --format xero -o statement-xero.csv
coda-to-excel statement.cod --format qbo -o statement-qbo.csv
coda-to-excel statement.cod --format json -o statement.json
```

## Related online accounting tools

- [Belgian CODA to Excel (.xlsx) online](https://radarbg.com/instant/coda-to-excel?ref=pypi-coda)
- [CAMT.053 & MT940 Bank Statement Converter](https://radarbg.com/instant/camt053-to-excel?ref=pypi-coda)
- [PDF Bank Statement to Excel / Xero / QBO / OFX](https://radarbg.com/instant/bank-statement-pdf-to-excel?ref=pypi-coda)
- [SEPA XML Generator & Checker](https://radarbg.com/instant/sepa-xml?ref=pypi-coda)
