GetOrdinal Not Supported

Jan 27, 2010 at 9:15 AM

I am using ExcelReader to insert via SQLBULKCOPY but it gives and error because GetOrdinal is not supported, any solution?

Apr 26, 2010 at 8:39 AM

you can read column names like this:

excelReader.Read();

var columns = new Dictionary<string, int>();

for (int i = 0; i < excelReader.FieldCount; i++)
{
   columns.Add(excelReader.GetString(i).Trim(), i);
}    

Dec 19, 2011 at 11:11 AM

Is there any plan to implement this in the future ? I think it's very important to have these functions implemented.