How to read cell value from excel sheet

Can any one share the code snippet to extract cell value from excel sheet in c#? I am getting an error when i am use the below code to get data.

oSheet.Cells[1, 1]

RajKumar | Answered# (13)
Reply For This Question
Answer(s) Posted
How to read cell value from excel sheet

Below code will do the work.

(oSheet.Cells[1, 1] as Microsoft.Office.Interop.Excel.Range).Value.ToString(); // You can cast it any datatype as it is dynamic.

Raj Kumar | Answered# (13)
Post Your Answer
   Please login to post your answer.
  Member Login
  Email Address  
  Password  
   Sign Up?  
  Privacy   Terms Of Use   Contact Us
© 2016 Developerin.Net. All rights reserved.
Trademarks and Article Images mentioned in this site may belongs to Microsoft and other respective trademark owners.
Articles, Tutorials and all other content offered here is for educational purpose only and its author copyrights.