This accomplished reading the file but then I wanted to output to a csv file. I decided to use the opencsv java package. After adding the import to the groovy script for
import au.com.bytecode.opencsv.*
, I then wrote the following codeUnfortunately the script did not run as opencsv expects a
List
of String[]
and did not like the groovy lists that it was given. Here's the exception:Caught: java.lang.ClassCastException: [Ljava.util.ArrayList; cannot be cast to java.util.List
at CheckClearer$_run_closure2.doCall(CheckClearer.groovy:30)
at CheckClearer.run(CheckClearer.groovy:30)
I explicitly had to create
String[]
s and then pass them to CSVWriter. Here's the final script:
3 comments:
Well done, and thanks for sharing your development,
it works well enough. But I was able to use the code and open .csv file https://wikiext.com/csv only after I updated Windows,
the browser and loaded the universal file viewer. And I determined right way was causing for open a lot of
file extensions as well.
Hi! I was much time to spend your post, it is very impressed to me. so I am regularly following your post. I would like more ideas from your blog...
Primavera Training in Chennai
Primavera Course in Chennai
Corporate Training in Chennai
Embedded System Course Chennai
Oracle Training in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Excel Training in Chennai
Power BI Training in Chennai
Thank you sharing this kind of noteworthy information. Nice Post.
imedicalassistants
Education
Post a Comment