读取“字符串”使用 Opencsv 分隔值
是否可以读取其中值由字符串而不是单个字符分隔的 csv 文件?早些时候,csv 文件有一个逗号分隔符,但现在它是使用字符串分隔符“###”创建的。我无法控制 csv 文件的创建。
我正在使用 Opencsv 库 http://sourceforge.net/projects/opencsv/ ,它确实似乎不支持仅字符串分隔符。
有办法解决以上问题吗? Opencsv 库有什么好的且类似的替代品吗?
Is it possible to read a csv file where the values are separated by a string rather than a single character? Earlier the csv file had a comma separator, but now it is being created with a string separator "###". I don't have any control over the creation of the csv file.
I'm using the Opencsv library http://sourceforge.net/projects/opencsv/ and it does not seem to have support for string separator only characters.
Is there a way to solve the above?
Are there any good and similar alternatives to the Opencsv library?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该文档为您提供了如何执行此操作的示例。请参阅http://opencsv.sourceforge.net/#custom-sepators。
The docs give you an example of how to do this. See http://opencsv.sourceforge.net/#custom-sepators.