I want to access a cell in Excel worksheet using C#. I tried to use the followed code:
if (xlWorksheet.Cells[k + 5, 0] == Convert.ToString(ent.Cells[i, 3].Value))
{
p = k;
}
But its not working.
Any help will be appreciated.
I want to access a cell in Excel worksheet using C#. I tried to use the followed code:
if (xlWorksheet.Cells[k + 5, 0] == Convert.ToString(ent.Cells[i, 3].Value))
{
p = k;
}
But its not working.
Any help will be appreciated.
Try the below code:-
Hope this will solve your problem.