Invalid char between encapsulated token and delimiter in Apache Commons CSV library

后端 未结 5 1671
有刺的猬
有刺的猬 2021-01-03 20:13

I am getting the following error while parsing the CSV file using the Apache Commons CSV library.

Exception in thread \"main\" java.io.IOException: (line 2)          


        
5条回答
  •  温柔的废话
    2021-01-03 20:56

    We ran into this in this same error with data containing quotes in otherwise unquoted input. I.e.:

    some cell|this "cell" caused issues|other data
    

    It was hard to find, but in Apache's docs, they mention the withQuote() method which can take null as a value.

    We were getting the exact same error message and this (thankfully) ended up fixing the issue for us.

提交回复
热议问题