How do I reference a field by it's (first) column name when not using a DataTable?
while (excelReader.Read())
{
var branch = excelReader["Branch"].ToString(); // <-- I get a __NotSupportedException__
Also, it seems the "IsFirstRowAsColumnNames" property is ignored if you're enumerating the reader? I checked a value by index and it was the header row.
while (excelReader.Read())
{
var branch = excelReader["Branch"].ToString(); // <-- I get a __NotSupportedException__
Also, it seems the "IsFirstRowAsColumnNames" property is ignored if you're enumerating the reader? I checked a value by index and it was the header row.