Hi, I have encountered this issue where defining a class to map my Excel file, if the name of the column in the Excel file has an space at the end, the mapping will fail and will parse everything as null/default.
Example:
public class MyClass
{
[Column("Property")]
public string MyProperty { get; set; }
}
In this case, if the name of the column in the Excel file is "Property " (<--- check the extra space at the end) the mapping will fail and will give you everything as null.
It would be nice if by default, it would add a .Trim() at the end of the columnName so we can skip this kind of situations.
Hi, I have encountered this issue where defining a class to map my Excel file, if the name of the column in the Excel file has an space at the end, the mapping will fail and will parse everything as null/default.
Example:
In this case, if the name of the column in the Excel file is "Property " (<--- check the extra space at the end) the mapping will fail and will give you everything as null.
It would be nice if by default, it would add a .Trim() at the end of the columnName so we can skip this kind of situations.