-
Details about the QIF format can be found here https://www.w3.org/2000/10/swap/pim/qif-doc/QIF-doc.htm
-
Using the file names which are already described in this file will make copying and pasting each command easier. Notably, changing
<export_date>is required. -
Ensure CMD is in the directory which the Python files are located
- Go to Westpac Online Banking
- Export each account separately as QIF
- Move these files into
data/<export_date> - Use these names:
raw_eSaver.qif,raw_choice.qif
- Run this command You only need to do this to one account. As GNUCash is a double-entry booking system, it will reproduce the transactions we are about to remove. If we skip this step, we will see the transfer transactions twice causing errors in our data. This command should be ran on the Choice QIF file to reduce the size of it
python remove-acc-tfr.py data/<export_date>/raw_choice.qif data/<export_date>/tfr_removed_choice.qif - Run these commands in cmd:
python qif-to-csv.py data/<export_date>/raw_esaver.qif data/<export_date>/esaver.csv python qif-to-csv.py data/<export_date>/tfr_removed_choice.qif data/<export_date>/choice.csv - Run these commands in cmd:
copy data\<export_date>\esaver.csv data\<export_date>\esaver_labeled.csv copy data\<export_date>\choice.csv data\<export_date>\choice_labeled.csv Note: Unix copy is cp. Windows copy is copy.
- Open
esaver_labeled.csvandchoice_labeled.csvin Excel - Remove row 1 which should read;
!Type:Bank - Add a column before
column A - Add the row number to the cells in column A. This will be used to sort the transactions back into the order they were exported in. That is;
A1 = 1, A2 = 2, A3 = 3, ..., A<n> = <n> - Modify the column after the
Lflag accordingly. This is the category flag. You will see flagsD,M,T,Land^in each row - If you have sorted the data during step 4, resort in ascending order on column
Ato return it to its original state - Remove
column A - Add a row above
row 1and put!Type:Bankinto cellA1
- Run these commands in cmd:
python csv-to-qif.py data/<export_date>/esaver_labeled.csv data/<export_date>/esaver_labeled.qif python csv-to-qif.py data/<export_date>/choice_labeled.csv data/<export_date>/choice_labeled.qif - IMPORTANT: Open both files and remove the commas on line 1. Line 1 should only read:
!Type:Bank
-
Open your GNUCash cash file
-
Select File->Import->QIF
-
Use the
choice_labeled.qifandesaver_labeled.qiffiles -
Enter your account names;
Assets:Westpac ChoiceAssets:Westpac eSaver -
Follow the prompts