transaction extraction (was Re: GnuCash Forum)

Anna's unattended mail anna.morris-1okt59qe at cool.fr.nf
Sat Sep 15 09:31:20 EDT 2012


On 2012-09-15, posword <wade.peter at gmail.com> wrote:
> I've completed a financial year and closed the books. Now my tax agent wants
> me to extract transactions for a specific period. I can see no way to do
> this.

An easy way to do this is with ledger.

Here's an example command:

  ledger --file            file.gnucash\
         --register-format "%D,%P,%t\n"\
         --begin 	   2011/01/01\
         --end             2011/12/31\
         --sort            date\
         --display         register .*

That will dump all transactions to the screen from accounts matching
the regular expression ".*" (that is, all accounts), between Jan. 1
and Dec. 31 of last year, assuming your gnucash file is named
"file.gnucash".

The format will be "date,description,amount".  You could then redirect
that to a file and import it into a spreadsheet tool.



More information about the gnucash-user mailing list