Exporting GnuCash Data

It is easy to get information into GnuCash, but getting it out is a different matter.

Background

The version of GnuCash that I’m using at the moment (2.4.2) doesn’t have an option to export the data.

It makes sense – a lot of programs these days are happy to import data from other programs they are replacing; but are reluctant to provide information for anything replacing it. Still, it’s not really a very “Open Source” attitude.

It is really just a minor annoyance because GnuCash is Open Source and they’ve done a lot of good things which does make exporting possible. One example is the use of XML for the data so, * in theory *, you can get the information into anything else in any format imaginable. In practice, it is a little harder.

The Easiest Way

It really was very very simple to Export. You just pick Reports, Transaction Report, Select All Accounts, Sort by Date, include the things you need, and don’t do any totalling.
You got a nice report listing everything.

Then you click the top left and drag to the bottom right of the report, copy, and paste wherever you want (Excel worked great).

The only slight inconvenience was the report was fairly long and you had to drag for some time (Ctrl-A = Select All, would have been nice).

Unfortunately, when I upgraded to 2.4.2 I could no longer select All Accounts. Maybe it is a feature. Maybe it’s a bug that is being fixed.

The Workaround

You can still make it work if you select Assets and Liabilities, export that, select Income and Expenses, and export those.
It is a bit harder, and you do end up with duplicates that aren’t totally obvious, but it does work and it is easier than any other option I’ve tried.

The report settings I use are:

 

To QIF

There is a great little tool that will take a GnuCash data file and create a QIF file from it. This is neat because we usually get data in from a QIF file. Going back to QIF makes it a symmetric process – you can get back what went in.

The other neat thing is the author wrote it in Java so it should run under any Operating System.

You do need to un-ZIP the gnucash data file but that is easily done. On Windows I use 7Zip but you could just as easily use WinZip or Windows’ built in tool. With earlier versions of GnuCash you had to fix the XML header but that has already been fixed in 2.4.2

The program is GnuCashToQIF.

It simply asks for the XML file to convert and where to put the QIF.

You can open the QIF file in Notepad, copy the content, and paste it into Sheet1 of the following Excel spreadsheet. It has a macro which will read the raw QIF information and make a transaction list in Sheet2. Use Alt-F8 QIFtoSheet to run the macro.
NOTE: Excel loses “$” at the start of split lines in the QIF so this doesn’t work well if you have a lot of splits.
Also, the Java program outputs unix style newlines which looks wierd (no line breaks) in many Windows programs. However, Excel will happily process the information.

The spreadsheet is QIFtoExcel-Example

Easy Ways for Lucky People

If you have installed GnuCash with a MySQL database there is probably an SQL select statement that will export the data in one step.

Share on Facebook0Tweet about this on Twitter0Share on LinkedIn0Share on Google+0Pin on Pinterest0Email this to someone
This entry was posted in GnuCash. Bookmark the permalink.

One Response to Exporting GnuCash Data

  1. Hey There. I found your blog using msn. This is a really well written article. I’ll be sure to bookmark it and return to read more of Exporting GnuCash Data | GssEziSoft . Thanks for the post. I will definitely comeback.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>