How? Auto-matching Imported Transactions to Accounts

Darren Merritt darren at darrenmerritt.com
Mon Jul 8 03:39:18 EDT 2013


I noticed I wasn't the first one to want a better way to match bank 
transactions imported in QIF files to specific accounts without the 
"guesswork" that currently takes place.

Sorry I didn't find a simple answer but happy to discuss it with anyone 
wanting to discuss it further.

I don't give up easily and my work-around (partially constructed in 
Java) is to write a utility to partially re-build the original QIF files 
from the bank so this extra info about Accounts to associate with 
transactions is in there first instead.  That means I don't have to 
touch anything in GnuCash.  The imported QIF files will work better.

For those not afraid of how QIF files are constructed, they are very 
simple text files.  Each line begins with a character describing what it 
contains, like D for Date, T for amount, P for Payee etc.  ^ means end 
of transaction data.

There's PLENTY of reds about QIF files.  I kinda like this for clarity:
http://web.archive.org/web/20100222214101/http://web.intuit.com/support/quicken/docs/d_qif.html

My bank exports only lines: D, T, P ie:

D05/07/13
T-22.40
P7-ELEVEN 1027 GLEN HUNTLY VI AUS Card xx3181 Value Date: 03/07/2013
^

I can get all the transactions containing "7-ELEVEN" to auto-match a 
specific account by adding a line starting with L (QIF Category field) ie:
D05/07/13
T-22.40
P7-ELEVEN 1027 GLEN HUNTLY VI AUS Card xx3181 Value Date: 03/07/2013
LExpenses:Groceries
^

This will guide GnuCash when importing QIF files.  It's a work-around 
which needs some utility to pre-process all the QIF files and identify 
what corresponding L - data to add to every transaction.  I'm working on 
it if others are interested.   It's not perfect but will largely do the 
job and save 90% of the work by identifying the obvious account matches.

It would be nice to have a better way but it's a little too much for me 
to handle.  This way I can manage :-)

Darren




More information about the gnucash-user mailing list