I’m trying to import a csv file to my grails project, what I’m trying to do is to build a map based on that csv file which is a list of countries (countries.csv) and use the map as a bootstrap data.
any ideas would be much appreciated
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am assuming (perhaps incorrectly!) that you mean that you once you have the csv file in your project, you want your program to read it and use the data contained in it.
There are a number of OSS CSV parsers out there. For starters:
Find one that does what you need. It’ll be easier than rolling your own, especially if your input file can have commas within strings, etc.