[GNC] CVS Import of Security Transaction

David Cousens davidcousens at bigpond.com
Mon May 4 17:11:58 EDT 2020


Matthew

The CSV importer is described reasonably fully in Ch6 of the help manual
https://www.gnucash.org/docs/v3/C/gnucash-help/trans-import.html. The
mulitiline format used to export GnuCash data is described in the following
section on exporting 
https://www.gnucash.org/docs/v3/C/gnucash-help/trans-export.html#trans-export-summary. 
Some fields in the export data can be left blank on import. Typically the
TransactionID, Num, Notes, Void Reason, Action, Memo, Full Account Name,
Reconcile, Reconcile Date and Account with Sym are fields not normally
present in import data except in data which has been exported from GnuCash
in the GnuCash Export Format. 

If the import data is multiline-multisplit as per the export data the
account being imported is specified in the first line. Your example would
be:
Date               Account     Commodity/Currency  Amount Num  Price
01/01/2020,    XYZ,         XYZ,                          5,                 
7.00
                 ,    BANK,      ,                                35.00,           
1.00

The spaces are only there to align with the headers so it will look like:

01/01/2020,XYZ,XYZ,5,7.00
,BANK,,35.00,1.00

in the actual file. You could specify the commodity/currency for the bank in
the second line if you are using a foreign currency account for the
transaction. Otherwise AFAIK it defaults to the currency of the parent of
the stock account.  When you do the import, the first step maps names in the
account field onto accounts as setup in the in the CoA.

If using the simple single line format you can either specify the account 
(Account header) and the transfer account (Full Category Path header) or
leave the Account field out and specify it in the importer setup.  Save your
import settings with a name and you can just select them next time. Make
sure the date format in the importer dialog matches the date format in your
file.

David Cousens

David Cousens



-----
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html


More information about the gnucash-user mailing list