Home > DeveloperSection > Forums > How to access a cell in Excel worksheet using C#
jayprakash sharma
jayprakash sharma

Total Post:117

Points:821
Posted on    November-13-2013 7:24 AM

 C# C# 
Ratings:


 1 Reply(s)
 761  View(s)
Rate this:

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.



ezra heywood
ezra heywood

Total Post:145

Points:1019
Posted on    November-13-2013 7:48 AM

Hi Jay,

Try the below code:-

if (xlWorksheet.Cells[k + 5, 0].Text == Convert.ToString(ent.Cells[i, 3].Value   ))

   {

     p = k;

   }

Hope this will solve your problem.


Don't want to miss updates? Please click the below button!

Follow MindStick