The following code seems to read from the first worksheet. How do I select a different worksheet?
FileStream stream = File.Open(@"D:\Transfer\NameSample.xls", FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
while (excelReader.Read())
{
excelReader.Close();
FileStream stream = File.Open(@"D:\Transfer\NameSample.xls", FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
while (excelReader.Read())
{
this.dataFields = excelReader.FieldCount;
this.dataLabel = excelReader.GetString(0);
this.dataValue = excelReader.GetString(1);
this.dataColor = excelReader.GetString(2);
}excelReader.Close();