以下方法允许使用跳过标题进行读取:
Iterable<CSVRecord> records = CSVFormat.EXCEL.withHeader().parse(in);
for (CSVRecord record : records) {
//here first record is not header
}
我如何从包含标题行开始读取 csv?
附言
方法:
CSVFormat.EXCEL.withHeader().withSkipHeaderRecord(false).parse(in)
不起作用并且具有相同的行为