I need to convert a CSVRecord
to a List
to get the position of an element.
So I used this :
List<CSVRecord> records = csvParser.getRecords();
int i = records.get(0).indexOf(element);
However, records.get(0)
returns a List<CSVRecord>
and not a List<String>
...
Moreover I cannot use csvParser.getHeaderNames();
because after that I need to copy the file with the header.