我正在使用以下代码使用 Apache commons CSV 解析 CSV 文件:
CSVFormat csvFileFormat = CSVFormat.EXCEL.withHeader().withQuoteMode(QuoteMode.MINIMAL);
在某些 CSV 文件中,我收到以下错误:
java.lang.IllegalArgumentException:
Mapping for Phone number not found,
expected one of [Address, City, State, Zip, Phone Number, Product, Comments/Description, Final Status, Date Closed]
我检查了文件,它包含一个“电话号码”列,列存在并且所有值都存在。
我究竟做错了什么?