[GNC] Import CSV Multi-currency

Geert Janssens geert.gnucash at kobaltwit.be
Sun Nov 25 09:47:31 EST 2018


Op zaterdag 24 november 2018 23:47:33 CET schreef David Cousens:
> The single line format data cannot be imported correctly at all at the
> moment as Geert indicated in his reply. The single line exported data has a
> separate column for the base account for the transaction and a separate
> column for the transfer account but in the importer as it is coded at the
> moment there is no facility to associate a transfer account to this column.
> 
This is inaccurate. You definitely can associate a transfer account to the 
column in single line import mode. There is "Account" and "Transfer Account" 
for a reason. And it works well in a single currency environment. It breaks 
down in a multi currency one.

Obviously with one "Account" column and one "Transfer Account" column there 
can only be a maximum of two accounts per line. As such a 'single line' import 
can only work for transactions involving only two accounts.

And that's why a multi-line mode was added: in this mode each line represents 
one split of a transaction. As one split can only belong to one transaction, 
the "Transfer Account" no longer makes sense in the multi-line mode. That's 
why it only appears in single-line mode.

> Geert also indicated that the main developer effort is currently directed to
> other areas. I have had a little bit of experience with some parts of the
> importer code although not that associated with currency/commodities to
> data so far. I will try have a look at the code area to see if I can
> isolate at least the above problem with the multiline import which is in
> the
> import-matcher I have previously looked at and fix that. I may learn enogh
> to start looking at the single line import problems, but that will certainly
> take longer.

That would be really cool. Don't hesitate to ask for clarifications of the 
code if needed.

Geert




More information about the gnucash-user mailing list