Cha-Ching and dutch banks
Posted by Andre Foeken Wed, 23 Jan 2008 19:38:23 GMT
Like lots of you I bought the incredible MacHeist app bundle last week. One of the appz was Cha-Ching, a finance program to keep track of your money.
One of the most useful features is the import. You can simply import all of your bank's records and be done with it. Unfortunately the dutch banks (or at least the Rabobank and Postbank) don't support the same formats Cha-Ching supports (like OFX/QIF).
I wrote a small ruby script to convert the banks CSV files to OFX files. There are two separate files below (one for each bank):
CSV convertor - Postbank (Ruby)
CSV convertor - Rabobank (Ruby)
Before you can run the files you need two additional gems (if you haven't got them already).
sudo gem install extensions
sudo gem install builder
After this you can use the scripts like this:
ruby csv_convert.rb [CSV FILE] > export.ofx
ruby csv_rabo_convert.rb [CSV FILE] > export.ofx
Update: Now supports Tiger using PHP version of script and (optional) automator
For the next files you don't need anything else than a vanilla Tiger install of OSX.
CSV convertor - Postbank (PHP)
CSV convertor - Rabobank (PHP)
You can use them like this:
php csv_convert.php [CSV FILE] > export.ofx
php csv_rabo_convert.php [CSV FILE] > export.ofx
For the simple version, use the automator zip file! Read the README to get it to work.

article.gsub(/CVS/i,"CSV") Or something like that...
ouch tnx! I always make that same mistake! And I don't even use CVS :)
Hello Andre, I have no idea about ruby, but very interested in the csv to qfx converter for cha-ching. I installed both gems but when running the script I received an csv2qfx.rb:22: undefined method `trim' for nil:NilClass (NoMethodError) from csv2qfx.rb:11:in `each' from csv2qfx.rb:11 I would appreciate some help on this. Thanks in advance. Javi
Monti: Are you using Tiger or Leopard? If Tiger, update ruby to 1.8.5. But your exception is probably caused by the gem not being installed, which could be caused by an old ruby version.
probably tiger issue... You can fix the error you have by replacing trim with lstrip.rstrip for a possible fix
Hello all, thanks for your time. I am using Leopard, ruby version 1.8.6 (2007-09-24 patchlevel 111). I replaced trip by lstrip.rstrip but I received this other message: a.rb:22: undefined method `lstrip' for nil:NilClass (NoMethodError) from a.rb:11:in `each' from a.rb:11 The only strange thing I have seen is this message when installing builder gem: sudo gem install builder Successfully installed builder-2.1.2 Installing ri documentation for builder-2.1.2... While generating documentation for builder-2.1.2 ... MESSAGE: Unhandled special: Special: type=17, text="" ... RDOC args: --ri --op /Library/Ruby/Gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc (continuing with the rest of the installation) Installing RDoc documentation for builder-2.1.2...
It sounds like either your cvs file is no good, or you have found something that the parser trips over. Could you determine the exact line on which it errors?
You can safely ignore the rDoc warning/error. These happen to me a lot too. These converters are specific to the banks listed above, did you run a CVS file from one of these banks or did you adapt the file to your own bank's file? If so you might have made an error there. It seems the script is trying to trim a nil value (perhaps a column is missing).
Hello All. You both hit the problem. I supposed that the cvs files are standarized in some way. My stupid error. I am using a cvs from my bank in Spain. I will try to adapt your script (if you allow me to do it) to use my bank format. Thanks all for your help Monti
Go ahead! Just release it open source ;)
'lil question: I see you make 5 ofx tags for a transaction (NAME DTPOSTED TRNAMT BANKACCTTO MEMO) But as far as i can see only NAME DTPOSTED and TRNAMT get used by the cha-ching importer. Correct? Although it would be nice if the MEMO tag would be converted to the Note field in cha-ching. I'm planning on writing a csv to ofx converter for Dexia's csv files (in applescript that is).
I know, I tested most tags but cha-ching would not take most of them. It just ignores them :(
Any luck making Cha-ching import transactions as pending? I've got the new neat receipts and want to automate entering transactions but since it isn't a statement I don't want to reconcile everything. :)
Bedankt! Works perfectly to use with the Mac Cha-Ching software.
hey! thank you for your csv2ofx ruby code! i've created a script for myself to convert tsv from my bank to ofx based on your code :)