I have usual csv file with header
f1, f2, f3
1, 2, 3
and I try to parse it:
Iterable<CSVRecord> records = CSVFormat.EXCEL.withIgnoreEmptyLines().withSkipHeaderRecord().parse(in);
records.forEach(record -> {
...
But anyway the first record is header anyway.
What do I wrong?
specify that file have header to skip:
CSVFormat.EXCEL.withHeader().withSkipHeaderRecord();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With