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!
Asked
Active
Viewed 728 times
1 Answers
2
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.

Claus Ibsen
- 56,060
- 7
- 50
- 65
-
Thank you! That worked. There seems to be a mistake in the documentation when it says "the last column is auto spanned to end of line, for example if its a comment, etc this allows the line to contain all characters, also the delimiter char.". In my test the last column only contains the value of that column, perhaps because I have defined a quote (") as well as a separator (,)? Anyway it's not an issue for me because I don't care about the last column. – Gep Sep 20 '17 at 09:35