Quantcast
Channel: Excel Data Reader - Read Excel files in .NET
Viewing all articles
Browse latest Browse all 448

Created Unassigned: Can't read columns when header row has a trailing space [13671]

$
0
0
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?

Viewing all articles
Browse latest Browse all 448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>