This tool converts Royal Bank of Canada (RBC) statements - Credit Card (Visa), Chequing, and Savings - into CSV files.
Supported statements (CSV created only if at least one matching statement is processed):
-
Credit Card (Visa) →
credit_transactions.csvwith the following columns:- Transaction Date
- Posting Date
- Description
- Credit
- Debit
- Amount Foreign Currency
- Foreign Currency
- Exchange Rate
- Raw
-
Chequing (identical layout to Savings) →
chequing_transactions.csvwith the following columns:- Date
- Description
- Withdrawls
- Deposits
- Balance
-
Savings (identical layout to Chequing) →
savings_transactions.csvwith the same columns as chequing.
- Python 3.8 or higher
- Create a virtual environment:
python3 -m venv .venv- Activate the virtual environment:
source .venv/bin/activate- Install required packages:
pip install -r requirements.txt- Create a new Python virtual environment using PowerShell:
python -m venv .venv- Activate the virtual environment:
.venv\Scripts\activate- Install required packages:
pip install -r requirements.txtDrop all PDF statements into the project directory. The program will auto-discover PDFs in the current folder (or you can pass specific files on the command line), read all transactions, sort them, and write only the CSV file(s) that correspond to the statement types actually processed. Savings statements (e.g., Savings Statement-4484 2025-01-15.pdf) are processed the same as chequing but written to savings_transactions.csv.
Notes:
- Visa parsing supports both older and newer RBC layouts. FX details (Exchange rate and Foreign Currency) are extracted when present.
- CSV files are only created when at least one matching statement is successfully processed (no empty header-only files).
- If a CSV file is open in another program (e.g., Excel), the script will prompt you to close the file and press Enter, then retry writing.
Run the script from a terminal:
python3 convert.pyTo run the script, you can either:
Double-click convert.py.
Important
Ensure .py files are associated with Python.
or
Run from PowerShell:
python convert.py