title: How can we read data from specific row or column in Excel?
body: <p>This is the code on which I am using but it reads the whole Excel sheet. How can I read data just from one specific column or row?</p>
  
  <pre><code>Application xlApp;
  Workbook xlWorkBook;
  Worksheet xlWorkSheet;
  Range range;
  
  string str;
  int rCnt = 0;
  int cCnt = 0;
  
  xlApp = new Application();
  xlWorkBook = xlApp.Workbooks.Open("c:\\telltales.xlsx");
  xlWorkSheet = (Worksheet)xlWorkBook.Worksheets.get_Item(1);
  
  range = xlWorkSheet.UsedRange;
  
  for (rCnt = 1; rCnt &lt;= range.Rows.Count; rCnt++)
  {
       for (cCnt = 1; cCnt &lt;= range.Columns.Count; cCnt++)
       {
            str = (string)(range.Cells[rCnt, cCnt] as Range).Value2;
            Console.WriteLine(str);
       }
  }
  </code></pre>