[GNC] CSV Import

David Cousens davidcousens49 at gmail.com
Thu Aug 24 17:05:21 EDT 2023


Jackielou,

The file looks ok.  You will need to have created the accounts in the transfer
column before importing. You may have to experiment with the header to apply to
the amount column. Assuming you are importing the transactions into an account
of type Asset, e.g. a bank account then normally assigning the deposit header to
the column with the Amounts should import OK. Try a small sample first and if it
doesn't import with debit transactions for the +ve amounts in the Amount column
of your import file switch the header assigned to Withdrawal. For the other
columns assigning the header that matches the column name  should be ok. Make
sure the date format is "mm-dd-yyy" in the CSV setup dialogue. Unfortunately
with CSV importing it takes a bit of fiddling but once you have a correct setup
for importing for a given source you can save the setup and recall it next time
you have to import from the same source


You will need to either specify transfer accounts for all the entries and the
accounts will have to have been created prior to the import or you will need to
assign them at the import matcher dialogue of the import procedure. You can
create new accounts from the account tab while in the import matcher dialogue
(while keeping it open) if they do not exist and then assign them to the
transactions in the import matcher dialogue. In most cases these appear to be
transfers to the account you are importing into from another asset account most
likely a main bank account to cover salary expenses.

If this doesn't work for you can you post some screenshots of the import
matching process for the above file.

David Cousens


On Thu, 2023-08-24 at 22:06 +0800, jackielou wong wrote:
> Hello
> i tried to import and csv file.
> Can you help me to transfer all of this into proper account; Here is my
> sample
> 
> On Thu, Aug 24, 2023 at 9:36 PM Murugan Muruganandam <
> m.muruganandam at hotmail.com> wrote:
> 
> > hi Jack
> > 
> > can you be more specific on what help you are looking for.  there are
> > quite a few knowlede base online
> > 
> > 
> > 
> > Saludos Cordiales
> > 
> > 
> > Murugan
> > ------------------------------
> > *From:* gnucash-user <gnucash-user-bounces+m.muruganandam=
> > hotmail.com at gnucash.org> on behalf of jackielou wong <
> > jcklcalimlim at gmail.com>
> > *Sent:* Thursday, August 24, 2023 12:07 AM
> > *To:* john <jralls at ceridwen.us>
> > *Cc:* gnucash-user at gnucash.org <gnucash-user at gnucash.org>
> > *Subject:* Re: [GNC] get quotes via gnucash-cli for unknown quote source
> > 
> > Hello there
> > 
> > Can i ask for importing 100 transactions using csv.
> > 
> > On Thu, Aug 24, 2023, 12:00 PM john <jralls at ceridwen.us> wrote:
> > 
> > > 
> > > 
> > > > On Aug 23, 2023, at 02:26, Jascha K via gnucash-user <
> > > gnucash-user at gnucash.org> wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > I've been trying to get quotes via gnucash-cli with the following
> > > command:
> > > > 
> > > > gnucash-cli --quotes get mysql://<connection-details>
> > > > 
> > > > However, I get the following message when executing the command and no
> > > quotes are fetched: 'Price retrieval failed: GncQuotes::Fetch called with
> > > no commodities.'
> > > > 
> > > > All of my quote sources are of type 'Unknown' (tradegate, fondsweb).
> > > > 
> > > > When I get the quotes via 'Get Quotes' in the Price Database, the
> > quotes
> > > are fetched normally, so it seems to be a problem with the CLI.
> > > > 
> > > > After some investigation, I found out 2 things:
> > > > 
> > > > 1. When switching the quote source for a security to a source that is
> > > not Unknown, the CLI is able to fetch that security's quote.
> > > > 
> > > > 2. When I edit the file libgnucash/engine/gnc-commodity.c and add the
> > > tradegate and fondsweb sources to the 'single_quote_sources' variable
> > (thus
> > > making them known sources), the CLI is able to fetch all quotes, no more
> > > errors.
> > > > 
> > > > This leads me to believe that the CLI fetching ignores securities where
> > > the quote source is Unknown, whereas the GUI fetches the quotes
> > regardless
> > > of the quote source. I was not able to pin down this behavior in the
> > > source, but maybe somebody can clarify whether this is the desired
> > behavior
> > > for the CLI.
> > > > 
> > > > Tested with most recent stable branch and Flatpak version 5.3, F::Q
> > > versions 1.54, 1.56 and 1.58, on Ubuntu 22.04.
> > > 
> > > Not desired behavior but not surprising either: In order to know about
> > the
> > > unknown quote source gnucash-cli -Q get needs to retrieve them from F::Q
> > > and it doesn't do that. Shouldn't be too hard to fix, but please file a
> > bug
> > > so that the problem doesn't get lost in mailing list entropy.
> > > 
> > > Regards,
> > > John Ralls
> > > 
> > > _______________________________________________
> > > gnucash-user mailing list
> > > gnucash-user at gnucash.org
> > > To update your subscription preferences or to unsubscribe:
> > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > > -----
> > > Please remember to CC this list on all your replies.
> > > You can do this by using Reply-To-List or Reply-All.
> > > 
> > _______________________________________________
> > gnucash-user mailing list
> > gnucash-user at gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> > 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-user mailing list