using kmymoney with hansapank

I’m using KMyMoney (KMM) to keep track of my finances and in general I think it’s a very nice program but I find inserting the transactions (ledgers) by hand a very tedious thing to do. I’m a client of the Hansapank and their web banking interface allows me to download transaction history in a CSV file. Since I practically always pay with debit card this transaction history covers almost all my transactions so the only question remaining was how to import it into KMM.

KMM seems to be able to import QIF and OFX formats, so in order to get my CSV file imported I wrote a python script that converts Hansapanks CSV to QIF (with KMM transaction ID extension).

Here it is, maybe it’s useful for someone else too. You can run it like so:

python hansacsv_to_kmymoney.py my_transaction_history.csv > out.qif

and import the resulting file into KMM. There’s an payee name based mapping mechanism too that allows you to map payee name from the CSV file to different name for the QIF file and attach category to it. There are several examples of such mappings near the beginning of the file.

Leave a Reply

Your email address will not be published.


*