Repeated Column Names

Nov 15, 2013 at 2:42 AM
I have a file coming from a source that has Column Name repeated 5 times. This causes the file to not work with you program. Is it possible to modify the program to have the ReadHeaderRecord() have an overload that causes duplicate columns to be automatically renamed with an integer. This would prevent manual creation of the header.

Sales Tax
Sales Tax1
Sales Tax2
etc....
Coordinator
Nov 15, 2013 at 9:46 AM
Sorry, but this requirement is far too specific to your use case to add to a general CSV parsing library, and KBCsv is doing the right thing by refusing to treat a record with duplicate names as a header. You can always wrap up the "read 1 record, generate header names, and treat that as the header" logic into your own helper class.