You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class UnitExcelRow
{
[ExcelColumn("barcode")]
public string Barcode { get; set; }
[ExcelColumn("gross [ kg]")]
public string GrossWeight { get; set; }
}
And the code looks like this:
var unitRaw = excel.Worksheet<UnitExcelRow>(0) // 0 for first worksheet<
.ToList();
I only get null for GrossWeight. I'm not sure why it's not working, if I change the header to "test" it works. I assume it's the square brackets that are not working.
The text was updated successfully, but these errors were encountered:
In a similar vein, I have a column header "Date/Time" and when I trying to select and filter on that column "from c in worksheet where c["Date/Time"] <... it comes back with an error that "..."Date/Time" is not a valid column name. Valid column names are... xxx, "Date/Time", yyy..."
I have an excel that looks like in the screenshot.
TestFileHeaders.xlsx
My mapping class looks like this.
And the code looks like this:
I only get null for
GrossWeight
. I'm not sure why it's not working, if I change the header to "test" it works. I assume it's the square brackets that are not working.The text was updated successfully, but these errors were encountered: