mperdeck / LINQtoCSV

Popular, easy to use library to read and write CSV files.
199 stars 112 forks source link

Error: the value cannot be null. Parameter name 'key' #27

Open michaelsogos opened 10 years ago

michaelsogos commented 10 years ago

Hi,

First thing, very great component!

When i set the property IgnoreUnknownColumns to True, the Read method raise the error in subject.

I created a model that doesn't map every column, but only needed. I used CsvColumnAttribute specifing the NAME and the FIELD INDEX.

What could be a problem is the name of the column? Something with space like "MY IMAGE PATH"?

utillity commented 10 years ago

try to also use IgnoreTrailingSeparatorChar - if the lines end with a separator, the last column has an "empty" column name which causes this

dipendrashekhawat commented 8 years ago

Facing the same issue - "Value cannot be null. Parameter name: key" while trying to read csv file.