CSV readin moneydance extension

percon's Avatar


11 Sep, 2017 09:33 AM

I wanted to develop an extension for moneydance to read, process and import csv files according to my own needs. However I stuck at the point in using opencsv (or any other library) for java. I am able to compile the extension and there are no compiling error due to non found classes etc. (Added opencsv and its dependencies into pathelement of build.xml). When trying to run the extension always java.lang.NoClassDefFoundError: com/opencsv/CSVReader gets thrown. Is there some material out there how to include the things right?

  1. Support Staff 1 Posted by Sean Reilly on 11 Sep, 2017 09:38 AM

    Sean Reilly's Avatar


    Thanks for experimenting with this. It sounds like the ANT build file will need to add the jar file with the com.opencsv.* classes into the .mxt file when it is building. The .mxt file is basically just a jar file with all needed libraries with an additional data that is added in the signing process.

    Hope this helps!

    Sean Reilly
    Developer, The Infinite Kind

  2. 2 Posted by percon on 11 Sep, 2017 09:48 AM

    percon's Avatar

    Thanks for the fast response. That sounds reasonable, I tried that by including the jar files in the jar target in the build.xml file by simply adding the path to the libaries:
    <fileset dir="../lib/" includes="*.jar"/>
    But maybe this is done wrong?

  3. 3 Posted by percon on 11 Sep, 2017 09:58 AM

    percon's Avatar

    Found the problem. As you said, the libraries were not correctly included into the jar build (.mtx) extension. By using:
    <zipgroupfileset dir="../lib/" includes="*.jar"/>
    and placing all .jar dependencies in lib folder everything works nicely!
    Thanks for the support!

  4. 4 Posted by Mike Bray on 11 Sep, 2017 12:57 PM

    Mike Bray 's Avatar

    Hi Percon

    If you want an example of this type of Java extension have a look at https://bitbucket.org/mikerb/moneydance-2015/wiki/Extensions. you will find the Securitypriceload and loadsectrans. In the source folder you will find a build.xml which should build it correctly.
    In https://bitbucket.org/mikerb/moneydance-2015/wiki/Development you will find some general notes about developing extensions,

  5. 5 Posted by -Kevin N. on 11 Sep, 2017 01:46 PM

    -Kevin N.'s Avatar

    Hi Mike,

    Have you seen Stan's work on the CSV Importer extension?

    -Kevin N.

  6. 6 Posted by percon on 11 Sep, 2017 05:20 PM

    percon's Avatar

    Thanks for the fast help. I managed to read in the csv.

  7. 7 Posted by Mike Bray on 12 Sep, 2017 08:07 AM

    Mike Bray 's Avatar

    Hi Kevin

    It seems to be similar to mine, I guess we were both just plugging a gap
    in MD features. It looks like Stan and I developed our extensions at
    about the same time.


  8. Support Staff 8 Posted by Sean Reilly on 12 Sep, 2017 01:48 PM

    Sean Reilly's Avatar

    Also, it's not source code, but recent releases of MD have support for importing text files built-in, including auto-detection of field types and date formats with 2-pass importing. You can use that API here:


    Sean Reilly
    Developer, The Infinite Kind

  9. System closed this discussion on 12 Dec, 2017 01:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac