I need to get information from sheet1 "your details" and then sheet2 "your sites"
Can anyone help ?
foreach (DataTable dt in result.Tables)
{
if (dt.TableName.ToLower().Contains("your details"))
{
excelReader.Read();
... do stuff
}
else if(dt.TableName.ToLower().Contains("your sites"))
{
excelReader.Read();
... This is the problem, I'm still reading from sheet "your details"
}
But when the code finds the sheet "your sites" and I call [excelReader.Read();] it is still reading from the first sheet... Can anyone help ?