Camel Bindy:如何忽略最后一列 [英] Camel Bindy: how to ignore last columns
问题描述
我有一个 CSV 文件,我正在使用 Bindy 对其进行解析.我已经创建了一个包含所有 DataField 的 CsvRecord 类.现在,他们向 CSV 文件添加了新列,我希望 Bindy 忽略它们.我怎么做?我知道我可以更改代码添加额外的字段并忽略它们,但是我不想每次有人决定向输入文件添加额外的列时都必须发布我的软件的新版本.谢谢!
I have a CSV file, which I'm parsing using Bindy. I have created a CsvRecord class with all the DataField. Now, they have added new columns to the CSV file and I want Bindy to just ignore them. How do I do that? I know I could change the code adding the extra fields and just ignore them, but I don't want to have to release a new version of my software every time somebody decides to add extra columns to the input file. Thank you!
推荐答案
你可能需要添加一个额外的字段,然后配置 bindy 使用 autospanLine = true
来允许额外的一个字段像现在或将来可能出现的任何其他列的垃圾字段.
You may need to add one extra field, and then configure bindy to use autospanLine = true
to allow that one extra field be like a garbage field for any additional columns there may come now or in the future.
这篇关于Camel Bindy:如何忽略最后一列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!