title: Insert text in specific cell in Excel c#
body: <p>I need to insert text in 5th row ist column and another text in 5th row 2nd column... How do I do this? Below is the code am using and get out of range exception:</p>
  
  <pre><code>Excel.Application xlApp;
  Excel.Workbook xlWorkBook;
  Excel.Worksheet xlWorkSheet;
  Excel.Worksheet xlWorkSheet2;
  Excel.Worksheet xlWorkSheet3;
  Excel.Range oRange;
  
  xlApp = new Excel.Application();
  
  xlWorkBook = xlApp.Workbooks.Add(misValue);
  
  xlWorkSheet2 = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
  xlWorkSheet2.Name = "The chart sheet";
  
  xlWorkSheet2.Cells[5, 1] = "First Name";
  xlWorkSheet2.Cells[5,2] = "Last Name";  
  </code></pre>