title: C# Interop Excel Range get_End is returning with 1 less element
body: <p>I need to parse an Excel file. First I wrote an extension in Visual Basic inside the Excel file, all worked good. Now I need to port it to C# so it can be a separate application. <br/>While the functions I use are the same, the result is not the same...</p>
  
  <p>When I choose from the GUI which Worksheet to parse, I do something like:</p>
  
  <pre><code>range = (workbook.Worksheets.get_Item(itemIndex) as Excel.Worksheet).UsedRange;
  </code></pre>
  
  <p>Then, for the first row I need to parse I do something like:</p>
  
  <pre><code>range.get_Range(range.Cells.get_Item(6, 2),
               range.Cells.get_Offset(6,2).get_End(Excel.XlDirection.xlToRight)))
  </code></pre>
  
  <p>And I get the right result with all the fields I need.
  <br/>
  The second time when I need to get another row, I do:</p>
  
  <pre><code>range.get_Range(range.Cells.get_Item(13, 3),
               range.Cells.get_Offset(13, 3).get_End(Excel.XlDirection.xlToRight)))
  </code></pre>
  
  <p>This time it gives me all the elements except the last one. And I have more functions like this, some with XlDirection.xlDown and all of them return me the range without the last element.</p>
  
  <p>I tried to swap the functions, thinking may be I need to release range and then acquire it again or something(wanted to check if it's always working only for the first function being executed) but it is always working only for the first example, whenever the function is being executed...</p>
  
  <p>This is even stranger because it worked in VBA Excel.</p>
  
  <p>I also tired with Excel.Application get_Range and Excel.Worksheet get_Range...</p>
  
  <p>Anyone knows why this happens?</p>