Difference between revisions of "CSV Import/Export"

From GnuCash
Jump to: navigation, search
(multi-splits)
(account field)
Line 57: Line 57:
  
 
In this mode, there are no Transfer fields, as each split record will be created 1-to-1 in GnuCash book.
 
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.
  
 
=== Importing Prices ===
 
=== Importing Prices ===

Revision as of 11:10, 6 March 2019

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.

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

Not 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

Splits

There are two modes for importing split records. These are selected by toggling the Multi-split checkbox.

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.

Importing Prices

Export

TBA