title: Calling Cells.End in Excel
body: <p>I am trying to get the last Row in Column <code>A</code>.
  Does anyone know why the following does not compile?</p>
  
  <p>It seem that it doesn't like <code>.End</code>…</p>
  
  <pre><code>Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet; 
  xlWorkSheet = 
      (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
  
  int iLastRow = xlWorkSheet.Cells[1,"A"]
      .End(Microsoft.Office.Interop.Excel.XlDirection.xlUp)
      .Row;
  </code></pre>