Guided CSV Import
Rather than attempt to learn the entire CSV import system on your own with your GnuCash file and import data, this tutorial will guide you though an import from GnuCash book creation to saving the imported data.
Contents
Save sample CSV data to your system
Note that I'm using Windows, so I'm going to use Notepad to save the CSV files. Any text editor will work. I selected UTF-8 as the character set, which is typical in today's world.
The following data is for Include the header line, so that your CSV file is three lines long. The name of the file does not matter, but for convenience, name the file "non-multi-split.csv" non-multi-split CSV data:
Date,Description,Deposit,Account 05/03/2006,Grocery Store,-45.21,Assets:Checking 14/03/2006,Employers R Us,670.00,Assets:Checking
Copy and paste the above three lines into your favorite text editor, and save the file as non-multi-split.csv
The multi-split CSV should be eight lines long. Once again, the name of the file does not matter, but for convenience, name the file "multi-split.csv" Multi-split:
Date,Description,Deposit,Account 05/03/2006,Grocery Store,-45.21,Assets:Checking ,,45.21,Expenses:Groceries 14/03/2006,Employers R Us,670.00,Assets:Checking ,,180.00,Expenses:Taxes:Federal ,,90.00,Expenses:Taxes:Medicare ,,60.00,Expenses:Taxes:Social Security ,,-1000.00,Income:Salary
Copy and paste the above eight lines into your favorite text editor, and save the file as multi-split.csv
The above samples were adapted from: https://lists.gnucash.org/docs/C/gnucash-manual/trans-import.html
Create a GnuCash file
Create the GnuCash test file. For this I'm going to make it as quick and easy as possible.
OPEN GNUCASH, and then:
FILE then NEW FILE.
This should bring up the "New Account Hierarchy Setup," the first step to creating a new file.
Click "next" on that screen and the next 2. Then You're at "Choose accounts to create." "Common Accounts" is pre-selected.
Click Finish.
Click Apply.
Now give this new GnuCash file a name.
This newly crated file is the practice file to work with.
Please note: If the account names in the CSV are slightly different than the GnuCash test files, but this will be handled during the import.
Import non-multi-split
Non-multi-split import involves specifying a split account that is common to all transactions.
Almost always the key to this import process is the IMPORT PREVIEW SELECTIONS. This will be true with all CSV imports.
File Import Transactions from CSV.
Click next
Select the non-multi-split file.
Click next.
Now we're at the "Import Preview" window. This is the critical spot.
File format is "Character-separated" Comma
The encoding is UTF-8 (as saved from above)
Since this is not a multi-split, we need to designate an account. Select: Assets:Current Assets:Checking Account
The date format for the sample data is D-M-Y.
Leading lines to skip is 1 (the header).
Now select DATE for the first column, Description for the second column, and Amount for the third column.
CLICK Next
CLICK Next
CLICK Apply
Now open up the Checking account, and there should be the 2 transactions. The "Imbalance" accounts are because there needs to be a second account. This will be fixed with the multi-split.
Import the data using multi-split import
With multi-split, you can designate the other accounts. This is where the real automation is at. Obtaining these other accounts can range from 'easy' to manual labor, depending on the data set, and how you set things up.
Let's revert our test file:
FILE REVERT - click yes.
Now to do the multi-split is basically the same as the non-multi-split.
File Import Transactions from CSV.
Click next
Select the multi-split.csv file.
Click next.
Now we're at the "Import Preview" window. This is the critical spot.
File format is "Character-separated" Comma
CLICK: Multi-split
The encoding is UTF-8 (as saved from above)
Since this is a multi-split, we do not designate an account at the top (as each split is separately designated an account in the multi-split.csv data file).
The date format for the sample data is D-M-Y.
Leading lines to skip is 1 (the header).
Now select DATE for the first column, Description for the second column, and Amount for the third column.
Account is the fourth column.
Click NEXT
Now on the "Match Import and GnuCash accounts" note that the import account is slightly different from the GnuCash account. We just need to match it. Click "Change GnuCash Account" on the bottom right.
Select the checking account and click ok.
Click NEXT
Click NEXT
Click APPLY
Click CLOSE
Now open the checking register.
View this with Transaction Journal (View - Transaction Journal)