FileHelpers
FileHelpers copied to clipboard
Add ability to read only n-first columns
Hi there, first of all, thank You for creating this awesome library. It helped me a couple of times!
Right now I need to parse a file that has 32 columns (http://www.nbp.pl/banki_w_polsce/ewidencja/dz_bank_jorg.txt) I need only 6 first columns. By default, I'll get an error when I have fewer fields that columns.
I found a temporary solution that requires adding one extra field:
[FieldOrder(7)]
private string[] mDummyField;
This isn't a problem, but maybe this could be avoided? Ideally, FileHelpers should only populate class with fields that are there.
Is this doable? I'll look into source and try to find something, but a starting point would be helpful :)