I have this CSV file that I want to read:
ID;Name;Age
GEORGE;GEORGE;19
JOHN;JOHNNY;45
MARCO;MARCO POLO;32
I also have to read it using this command:
for (CSVRecord rec : CSVFormat.DEFAULT.withDelimiter(';').parse(in)) {
//some code
}
I don't want to read the first line, because it's just the description of what contain the fields
I also tried to find the resolution of this in stackoverflow and other sites, but I didn't find how to do it.
EDIT 1: I imported CSVRecord and CSVFormat from org.apache.commons.csv.CSVFormat and org.apache.commons.csv.CSVRecord
EDIT 2: My post is not a duplicate because I'm asking about a library, just as @slim commented
CSVRecord, andCSVFormat? You have to show us more of what you have.CSVFormat#withSkipHeaderRecord(true)