jGnash CSV Import Plugin

jGnash CSV import plugin

It does not matter if you want to start a travel around the world or want to buy a digital SLR - comparing your income and your expenses help you to find out, how much money you save every month and if there is anything you don't need periodically to save more money. The comparison also visualizes your assets and can motivate you to reach your goals earlier. In former times a book of household accounts was used, now many applications are offered to support you.

One of these applications is jGnash. After a short overview I want to introduce a plugin for jGnash I developed. It enables you to import CSV (comma separated values) files into jGnash. Since these files are often generated by online banking software, it helps you to avoid failures and reduces the effort for entering the transactions enormous.


jGnash is an open source Java application for tracking and managing your financial transactions. You can download it at

For starting jGnash you need just Java 1.7 or higher. The attached manual shows you the steps for the installation and gives you an overview about the handling of the application. Therefore I don't want to go into further details about using jGnash itself.

But the principles of the the double entry bookkeeping in general needs getting used to.

"Double-entry bookkeeping, in accounting, is a system of bookkeeping so named because every entry to an account requires a corresponding and opposite entry to a different account. For instance, recording earnings of $100 would require making two entries: a debit entry of $100 to an account called Cash and a credit entry to an account called Income."


At the beginning it sounds a little bit difficult, but jGnash supports you with placeholder-accounts and intuitive dialogs very well. The most important step at the beginning is to think about the accounts and account-groups you need in the future. jGnash provides a couple of examples, how that could look like.

jGnash CSV Import Plugin

My online banking account offers an export of all transactions. It creates a CSV (comma separated values) file which I can download. Every line represents a transaction and contains the date, the amount, a description and so on. The values are separated by a semicolon.

The CSV Import Plugin offers a dialog for importing such files into jGnash. This saves a lot of time and avoids spelling mistakes in comparison to transcribe the account statement.


  • Be sure you have installed Java 7.0 or higher. You can check it with the command java -version.
  • Download the zip-file which contains the plugin and Guava.
  • Unzip both files in the zip-file into the following directories:
    • csvimport-1.0.jar/csvimport-2.0.jar into the directory plugins
    • use the Guava version from the zip file or download it on github.com/google/guava and put it into the directory lib
  • Restart jGnash if it is already started

If the entry File > Import > CSV... does not exist in the menu, please use the version 2 of the plugin. In the jGnash version 2.26 the interface for plugins has been changed. Therefore I had to adapt the plugin as well.

Attention: currently this plugin does not work with the JavaFX version!

Preparation of the csv-file

First create a csv-file with the bookings in your online banking application. Every booking must be represented by a line in the file. The columns must contain the date, the amount and a short note about the booking. The plugin supports two kinds of csv-files:

1. The first line in the csv-file contains the headlines of the columns. The following headlines must exist in the first line:

  • Date (date when the booking was done)
  • Amount (the amount of money; if it is a debit, the number must be negative)
  • Memo (a short note about the booking)

The following example shows the content of a csv-file:

"Drilling machine";13/06/15;-110,00;EUR;
"Meat and vegetables";13/06/15;-41,48;EUR;
"Mobile phone";14/06/15;-25,31;EUR;

2. You don't need the headlines in the first line, but the 3 needed columns (date, amount, memo) must be in a special order:

  • 2nd column: memo
  • 3rd column: date
  • 4th column: amount

This is an example without the column headlines:

15/06/2015;"Drilling machine";13/06/15;-110,00;EUR;13/06/2015 07:15:13:145;
15/06/2015;"Meat and vegetables";13/06/15;-41,48;EUR;13/06/2015 11:56:20:694;
15/06/2015;"Mobile phone";14/06/15;-25,31;EUR;14/06/2015 09:43:03:527;
18/06/2015;"Wage";17/06/15;1050,31;EUR;17/06/2015 09:43:03:527;

Please consider the following points:

  • Use always a semicolon for separate the columns. The last character of a line does not need to be a semicolon.
  • Quotes at the beginning and the end of a text are ignored
  • Please consider your country settings of your operating system when you enter the date and the amount. In Austria/Germany we usually use a comma and no point and dates look like 20.01.2015. In the USA or England usually points are used and dates look like 20/01/15. If you don't know your settings, just try different formats. If something cannot be parsed, it won't be shown in the import wizard.
  • The column currency is ignored. Usually the default currency which you chose during the initialization of jGnash, is used.


The following screenshots show the steps for importing a csv-file. Please click onto the images to enlarge them.

If you like jGnash and the CSV Import Plugin, feel free to share this page! It is for free and I am glad to make life easier with this little plugin.

More interesting articles...

Please share this page with your friends, if you like it!!

Comment by Daniel |

Hi Johannes,

super Plugin, genau was ich brauche!

Ich habe Dein Plugin (Version 2.0) mit der aktuellen Version von jGnash 2.32.0 versucht, aber bei Ausführen des Menü-Eintrags "File -> Import -> CSV..:" folgende Fehlermeldung bekommen (s.u.). Die guava-22.0.rar habe ich in den lib-Ordner gelegt und die csvimport-2.0.rar in den plugins-Ordner.

By the way: Siehst Du eine Möglichkeit, Dein Plugin so zu erweitern, dass aus der CSV-Datei auch das Ziel-Konto für jede Transaktion ausgelesen wird?

Viele Grüße!

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: com/google/common/base/Splitter
at info.johannesgruber.jgnash.plugin.csvimport.ImportCsvAction$ImportCsv.done(ImportCsvAction.java:115)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: com/google/common/base/Splitter
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at javax.swing.SwingWorker.get(SwingWorker.java:602)
at info.johannesgruber.jgnash.plugin.csvimport.ImportCsvAction$ImportCsv.done(ImportCsvAction.java:99)
... 20 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Splitter
at info.johannesgruber.jgnash.plugin.csvimport.parser.CsvParser.getColumNames(CsvParser.java:91)
at info.johannesgruber.jgnash.plugin.csvimport.parser.CsvParser.parse(CsvParser.java:43)
at info.johannesgruber.jgnash.plugin.csvimport.ImportCsvAction$ImportCsv.doInBackground(ImportCsvAction.java:88)
at info.johannesgruber.jgnash.plugin.csvimport.ImportCsvAction$ImportCsv.doInBackground(ImportCsvAction.java:1)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Splitter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 10 more

Comment by Johannes |

den Fehler habe ich gefixed und mit der Version 2.1 sollte die Fehlermeldung nicht mehr auftreten. Nachdem ich die guava-Version geändert hatte, passte ich nicht die MANIFEST-Datei an.

Wegen dem Zielkonto werde ich nichts machen, denn jGnash versucht aufgrund des Buchungstexts selbst das Zielkonto zu finden. Gibst du beispielsweise als Buchungstext immer "Miete" oder "Miete Whg" an, so versucht jGnash immer das Zielkonto, das beim vorherigen Mal ausgewählt wurde, wieder zu verwenden.

I am looking forward to your message!

Fields marked with a star are mandatory.

Last update on 2017-09-23.
Das bin ich - Johannes Gruber
Written by

Travelling, taking pictures and discover new places... I am developing software and in my sparetime I like to discover new places and taking pictures of special moments.

Diese Internetseite verwendet Cookies, um die Nutzererfahrung zu verbessern und bestimmte Dienste anzubieten. More