To convert American Express CSV to QIF

David Carlson david.carlson.417 at gmail.com
Mon Oct 27 17:05:23 EDT 2014


On 10/27/2014 3:38 PM, Michael DeBusk wrote:
> Some time back, I found that I could no longer download QIF files from
> American Express. I could, however, get a CSV. The following is my
> first shot at a one-liner to convert that particular CSV to QIF.
>
> cat ofx.csv | sed -e 's/\"//g;s/Reference\:\ //g;s/ \{1,\}/ /g'
> ofx.csv | awk -F, '{ print "D" $1; print "N" $2; print "T" $3; print
> "P" $4; print "M" $5; print "LExpenses:&&"; print "^"; }' > amex.qif
>
> It's not perfect, but since I can barely scratch the surface of awk
> and sed, it'll do. I haven't found that it ruins anything. If anyone
> can improve upon it, I'd be grateful.
>
> (The last awk instruction to print "LExpenses:&&" creates an account
> placeholder for me in each transaction. I go in and edit the QIF
> afterward, replacing "&&" with the appropriate account name.)
>
> --
> ()  ascii ribbon campaign     * against html e-mail
> /\  www.asciiribbon.org       * against proprietary attachments
> Home: http://nlphilia.com     * Blog: http://nlphilia.net
> Registered Linux User #450983 * Ubuntu Counter Project #10548
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>

I can still download my American Express transactions in OFX format.  I
just pretend that I want a Quicken file.

David C


More information about the gnucash-user mailing list