gnucash: a locked-in situation?

Derek Atkins warlord at MIT.EDU
Wed Feb 5 11:22:58 CST 2003


Hi,

First, GnuCash does not really have a supported way to "merge"
multiple GnuCash files together.  One reason is consistency -- what
happens if you have multiple files of the same name?  What if there
are duplicate transactions?  There are a lot of potential problems.

The GOOD news is that with the new transaction importer framework we
could write such a "GnuCash importer"..  But nobody has written it,
yet.  Any takers?

> > I'm not sure how well it could work, but you could try copy/paste from
> > one file to the other.  The files are in text format (XML).  I've not
> > tried it yet myself.  You'd have to make sure the appropriate other
> > transaction/accounts/etc. are there.  Try it with copies of your
> > existing files so you don't corrupt anything. Please report results. :)
> 
> It didn't work out. I found the transactions. It seems that they refer to the 
> account not by name, but by a rather long internal code. So I copied the 
> accouts as well, but renamed them beforehand, so I would not get confuses 

Yes, Transactions (well, Splits ;) refer to Account by GUID (so that
you can change the account names at will and retain reference
integrity).  That means you will need to copy all referenced accounts
in all the transactions you move.

> after the import. Next step: opening gnucash after the import. Everything 
> seemed to be all right. But from then on reopening the file failed. I suppose 
> that gnucash has an internal consistency check and that the method described 
> in some way violates consistency. 

Yes, there are a number of consistency checks, but I'm surprised that
the file loaded one time and then didn't load again.  First, you need
to add the Accounts to the Account section of the XML document, and
you need to add the Transactions to the Transactions section of the
XML document.  Then you'll need to modify the "count" of Accounts and
Transactions to make sure you have the correct number.

I must admit that I've never tried this myself, but I see no reason it
wouldn't work...  Provided all the references are maintained.
Especially if it loads the first time, I don't know why it would fail
later.  So, how _does_ it fail?

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list