Mapping Unmapped columns
Closed this issue · 1 comments
Hi,
I have an unmapped column "REVENUE DISTRICT OFFICE". I tried adding a column to the class by doing the following:
[Column("REVENUE DISTRICT OFFICE")] //add this with spaces
public string REVENUE_DISTRICT_OFFICE { get; set; }
[Column("REVENUE_DISTRICT_OFFICE")] //add this with underscores
public string REVENUE_DISTRICT_OFFICE { get; set; }
public string REVENUE_DISTRICT_OFFICE { get; set; } //removed the Column data annotation.
After doing these things, it still showed in the Unmapped columns.
Help please... thanks! :)
Sol
Hi,
This was not really an issue. I just didn't know about [ExcelColumn].
I was just a lazy reader. Hope this helps those lazy readers also :D.
[ExcelColumn("REVENUE DISTRICT OFFICE")] // this worked!
public string REVENUE_DISTRICT_OFFICE { get; set; }
Sol