I have an issue reading a spreadsheet in when the header row has a trailing space on all the header column names.
I can usually do this, row["ColumnName"] but if when it has a trailing space, I can't event do this row["ColumnName "] as I get the "NotSupportedException".
My only choice is to either remove the trailing space from the spreadsheet, or reference the column by index. I have also tried looping thru the columns to get their names and then try to access the data using these names, but I get the same exception.
Anyone experience something similar or have a workaround other than changing the spreadsheet?
I can usually do this, row["ColumnName"] but if when it has a trailing space, I can't event do this row["ColumnName "] as I get the "NotSupportedException".
My only choice is to either remove the trailing space from the spreadsheet, or reference the column by index. I have also tried looping thru the columns to get their names and then try to access the data using these names, but I get the same exception.
Anyone experience something similar or have a workaround other than changing the spreadsheet?