Difference between revisions of "CSV Import/Export"
(issue with multi-currency transfer) |
m (Category:CSV) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:CSV]] | ||
This page will contain the information specific to import and export of CSV-formatted data into and out of GnuCash. More specifically, it will related to the current production version of GnuCash, which is v3.4 at the time of writing. | This page will contain the information specific to import and export of CSV-formatted data into and out of GnuCash. More specifically, it will related to the current production version of GnuCash, which is v3.4 at the time of writing. | ||
Line 29: | Line 30: | ||
* Withdrawal | * Withdrawal | ||
− | + | Note that the Account can be selected in the import window, if all the transactions in the file affect only one account. In such a case the Account does not need to be specified in the .csv file. | |
In addition, the following columns can be imported: | In addition, the following columns can be imported: | ||
Line 47: | Line 48: | ||
* Transfer Reconciled | * Transfer Reconciled | ||
* Transfer Reconciled Date | * Transfer Reconciled Date | ||
+ | |||
+ | [[Formal/Informal Label Equivalence and Importing CSV]] | ||
==== Splits ==== | ==== Splits ==== | ||
There are two modes for importing split records. These are selected by toggling the Multi-split checkbox. | There are two modes for importing split records. These are selected by toggling the Multi-split checkbox. | ||
+ | |||
+ | For simple transactions, involving transfer between only two accounts, the easiest scenario is to use Transfer Account column. This is similar to the category-based systems, where one record contains all the information about the transfer. Note that this applies to single-currency transfers. | ||
+ | Multiple-currency transfers need to be tested in that regard. | ||
+ | |||
+ | A second approach is to send each split individually. | ||
+ | The results need to be confirmed for this case. | ||
==== Multi-Split ==== | ==== Multi-Split ==== |
Latest revision as of 19:52, 8 November 2021
This page will contain the information specific to import and export of CSV-formatted data into and out of GnuCash. More specifically, it will related to the current production version of GnuCash, which is v3.4 at the time of writing.
A MasterCard-specific issues are handled in a separate page.
Contents
Import
The CSV importer has been enhanced for GnuCash v3, allowing customization of the importer. One can now select specific fields from a .csv file and map them to the values of the resulting Split. Several different formats, for numbers and dates, are available to choose from.
Accounts, transactions, and commodity prices can be imported from CSV files.
More specs to be added after testing and writing a CSV exporter library.
Importing Accounts
Importing Transactions
This is the CSV import for transactions window: https://imgur.com/F17CZwK
It allows setting the destination account, column separator character, date format, file encoding, currency format, number of lines to skip at the beginning or the end of the file, column mapping.
The mandatory fields are:
- Date
- Account
- Description
- Deposit and/or
- Withdrawal
Note that the Account can be selected in the import window, if all the transactions in the file affect only one account. In such a case the Account does not need to be specified in the .csv file.
In addition, the following columns can be imported:
- Num
- Notes
- Transaction Commodity
- Void Reason
- Action
- Price
- Memo
- Reconciled
- Reconciled Date
- Transfer Action
- Transfer Account
- Transfer Memo
- Transfer Reconciled
- Transfer Reconciled Date
Formal/Informal Label Equivalence and Importing CSV
Splits
There are two modes for importing split records. These are selected by toggling the Multi-split checkbox.
For simple transactions, involving transfer between only two accounts, the easiest scenario is to use Transfer Account column. This is similar to the category-based systems, where one record contains all the information about the transfer. Note that this applies to single-currency transfers. Multiple-currency transfers need to be tested in that regard.
A second approach is to send each split individually. The results need to be confirmed for this case.
Multi-Split
Multi-split import adds a Transaction ID field to the CSV mapper. Based on this Id value, the splits will be grouped into a transaction.
In this mode, there are no Transfer fields, as each split record will be created 1-to-1 in GnuCash book. The Account field becomes mandatory and it is no longer possible to select the global account in the top field, to which all the records would be assigned.
There is an issue importing multi-currency transfers. In this case, the Price column may be added to the CSV record and it affects the amount going to the receiving account but the resulting value is strange. The original deposit record will be imported from the CSV but additional record will be added as adjustment.
Importing Prices
Export
TBA