воскресенье, 4 октября 2015 г.

Importing CSV into GnuCash

Importing CSV into GnuCash

So we have experimented scientifically and carefully and can confirm and replicate the steps below to import CSV files into GnuCash 2.6.4:

1. Open the CSV file (e.g., exported from GnuCash) in an editor (e.g., LibreOffice Calc):

    a. Edit the file to change date column format from MM/DD/YYYY to m-d-yy

    b. If there are split transactions
        i. Add the parent transaction date to each of the splits
        ii. Add the parent transaction account to each of the splits
        iii. Delete the parent summary line
        iv. Delete the parent split line
        v. Select the number columns and delete all minus signs
        vi. save and close.
        
2. In GnuCash:
    a. Import Transactions from CSV

    b. Keep the Data Type as Separated
        i. If it does appear as columns then examine the Separators
            to find the right one (Comma, Tab, Semicolon, etc.)

    c. Change the Date Format to m-d-y

    d. Change the Currency Format to Period

    e. In the None |None |None |None |... row:
        i. Rename the Date, Num, Account, Description, To Num, From Num
            columns to
                Date, Num, Account, Description, Deposit, Withdrawal

    f. If you see headers in the presented view then change 
        i. Start import on row
            to whatever causes the headers to be highlighted in pink,
            e.g., 2

    g. Change 
        i. stop row on
            to whatever clears any data from being highlighted in pink,
            e.g., 4

    h. Click Forward

    i. The Match Transactions screen appears:
        i. It has correctly read the Category column and creates 
            an Info column entry that states
            New, transfer $(xxx) to (auto)"*Category Name*"

    j. Click Apply. It reports success. Click Close.

    k. If it is a new transaction it appears. If it is a duplicate it simply overwrites the original

Discussion

I was on GnuCash 2.4.13 under Linux openSUSE 13.1. This is the default version offered by their repositories. However, in yast2 sw_software you can search for gnucash and open the Versions tab to select the current 2.6.4offering:

2.6.4-63.1 x86_64

You have to do this also for gnucash-lang to avoid conflicts.

That works. So now we are on 2.6.4.

This offers File → Export → Transactions to CSV

That works just fine.

Importing, however, is a bit more daunting. 

1. First you clear out all the unwanted columns

It appears that the GnuCash CSV import routine requires exactly one line per transaction split, and NO HEADERS, NO TRANSACTION SUMMARY line, and a funky DATE FORMAT.

So you have to load the exported CSV file into an application, e.g., LibreOffice, and farkle with it a bit. ESPECIALLY if it was exported from GnuCash.

2. Regarding the date format: 

It appears that the routine requires m-d-y. But neither Windows 7 nor LibreOffice have that explicitly. You can enter m-d-y as a custom date format in LibreOffice, but 09/04/14  is rendered 9-4-y

So you must use m-d-yy in LibreOffice. 

3. Remove unwanted rows:

It appears that the GnuCash import routine expects one and only line for each transaction and really only requires 5 fields to work. 

But if the CSV was exported from GnuCash you will have at least three lines with fifteen fields:
    1. A summary line for the transaction with Account and fifteen other fields.
    2. Another line for each destination account but no date or account or description fields
    3. Another line for the parent account transaction split again without date or account or description fields.
    
    You must remove #1 and #3.

Otherwise, a piece of cake. 



Hi Lombard,

After cleaning up the data you posted (which had been quoted and wrapped) and saving as a csv file, I was able to import it into a credit card account.  Judging from the error message you got, I think you may not have mapped the fields by selecting from the dropdowns at the top of each column.  I selected Date for Transaction Date, Description for Description and Deposit for Amount. (A payment is considered a Deposit and a charge is treated as a withdrawal).  These are the only fields needed and the other fields I left as "None".  You have two opportunities to choose the expense account to post to.  You can double click on the line and select from an account list, or let it default to Imbalance and then change the transaction in the register for the credit card account.

I hope this helps you.

Regards, Bob Taylor




Desperate GnuCash user (CSV import into GnuCash)
Lombard Steyn lombard.steyn at gmail.com
Wed Apr 4 08:45:41 EDT 2012

    Previous message: Desperate GnuCash user
    Next message: Retrieving account data
    Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Good Day

Thank you for the replies so far.

My bank does not support OFX or QFX, unfortunately, or the online web
connect options.

Hoping someone can sure with me the exact CSV import file format GnuCash
requires for CSV import to work properly. I can then myself change the file
I get from my bank inline with the GnuCash CSV expected file format or
specification.

Thank you.
Lombard

-----Original Message-----
From: Dustin Henning [mailto:The00Dustin at gmx.net] 
Sent: 04 April 2012 02:07 PM
To: 'Yawar Amin'; 'Lombard Steyn'
Cc: gnucash-user at gnucash.org
Subject: RE: Desperate GnuCash user

I am not familiar with importing from CSV.  Does your bank offer an OFX or
QFX option you could use instead?  Note that one of my banks only "supports"
older versions, but that is for direct connections, they offer a web connect
option that allows you to download these files.  The support at said bank
wasn't able to tell me this when I told them it was what I wanted to do, I
just managed to figure it out on my own after talking to them.
 Dustin

-----Original Message-----
From: gnucash-user-bounces+the00dustin=gmx.net at gnucash.org
[mailto:gnucash-user-bounces+the00dustin=gmx.net at gnucash.org] On Behalf Of
Yawar Amin
Sent: Wednesday, April 04, 2012 07:59
To: Lombard Steyn
Cc: gnucash-user at gnucash.org
Subject: Re: Desperate GnuCash user


On 2012-04-04, at 05:07, Lombard Steyn wrote:

> Good Day,
> 
> Thank you very much for a great application, docs and tutorial.
> 
> I am trying to import the following credit card bank CSV down load 
> into the liability.credit card account in GnuCash without success.
> 
> "Transaction date","Date posted","Card
holder","Description","Type","Amount"
> "03-03-2012","05-03-2012","L STEYN                   ","WOOLWORTHS SUNSET
> BEACH SUNSET BEACH    ","Purchase","-124.10"
> "02-03-2012","06-03-2012","L STEYN                   ","I numetro.co.za
> ROSEBANK        ","Purchase","-59.00"
> "05-03-2012","07-03-2012","L STEYN                   ","SUNSET BEACH
SERVICE
> ST SUNSET BEACH    ","Purchase","-113.30"
> "08-03-2012","09-03-2012","L STEYN                   ","AMAZON MKTPLACE
PMTS
> AMZN.COM/BILL   ","Purchase","-99.27"
> "08-03-2012","09-03-2012","L STEYN                   ","AMAZON MKTPLACE
PMTS
> AMZN.COM/BILL   ","Purchase","-118.41"
> "08-03-2012","09-03-2012","L STEYN                   ","AMAZON MKTPLACE
PMTS
> AMZN.COM/BILL   ","Purchase","-209.73"
> "08-03-2012","09-03-2012","L STEYN                   ","AMAZON MKTPLACE
PMTS
> AMZN.COM/BILL   ","Purchase","-261.12"
> "12-03-2012","12-03-2012","L STEYN                   ","#LATE PAYMENT FEE
> ","Other Transaction Fee","-210.00"
> "14-03-2012","14-03-2012","L STEYN                   ","I/BANK
PAYMENT-THANK
> YOU                ","Payment","10000.00"
> "13-03-2012","14-03-2012","L STEYN                   ","WOOLWORTHS SUNSET
> BEACH SUNSET BEACH    ","Purchase","-111.90"
> "16-03-2012","16-03-2012","L STEYN                   ","INTEREST
> ","Finance Charge","-374.25"
> "16-03-2012","17-03-2012","L STEYN                   ","PLI*DRIPABLE
> Plimus,Inc      ","Purchase","-526.42"
> "17-03-2012","19-03-2012","L STEYN                   ","S*SUNSET BEACH
WINE
> &   TABLE VIEW   ZA ","Purchase","-212.50"
> 
> All I really need is Transaction Date, Description (Payee) & Amount. 
> How can reformat this for it to work with the import CSV function, or 
> what format must the CSV function be exactly to be able to import 
> successfully. I have tried many different options but every time get 
> the same results (it says "no date, no balance, no withdrawal, no 
> deposit column) every time.... see below for some examples.
> 
> Our bank does not maintain a balance column in statements only
> 
> Please help?!
> 
> Thank you.
> Kind Regards
> Lombard
> 
> 
> 
> 
> 
> 
> 
> <winmail.dat>





0 коммент.:

Отправить комментарий