骆驼邦迪:如何忽略最后一列 [英] Camel Bindy: how to ignore last columns

查看:80
本文介绍了骆驼邦迪:如何忽略最后一列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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.

这篇关于骆驼邦迪:如何忽略最后一列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆