tags:

views:

302

answers:

3

Hi! I have developed a groovy application. Now it has been required that for feeding the DB a CSV interface must be provided. That is, I have to load a csv file, parse it and insert records into the DB in a transactional way.

The question is if there exists for groovy something like ostermiller utils (a configurable csv parser).

Thanks in advance,

Luis

+1  A: 

Groovy and Java are interoperable. Take a look at the documentation for mixed Java and Groovy applications. Any Java class can easily be used in Groovy with no change (plus you have the groovy syntax). If you are interested in the ostermiller utils to do your CSV parsing, you can use it directly from Groovy.

Chris Dail
+1  A: 

If the ostermiller library does what you want you can call it directly from Groovy. Just put the necessary jars in your groovy\lib directory and you should be ready to go.

Jared
+1  A: 

Kelly Robinson just wrote a nice blog post about the different possibilities that are available to work with CSV files in Groovy.

Christoph Metzendorf