LINQtoCSV icon indicating copy to clipboard operation
LINQtoCSV copied to clipboard

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

Open michaelsogos opened this issue 10 years ago • 2 comments

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"?

michaelsogos avatar Aug 27 '14 23:08 michaelsogos

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

utillity avatar Sep 29 '14 10:09 utillity

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

dipendrashekhawat avatar Dec 21 '15 06:12 dipendrashekhawat