title: Excel Add-in - Delphi equivilent to VB
body: <p>I'm porting an Excel add-in from visual VB to Delphi 2006.  Most of it is working but I am stuck on these two VB lines:</p>
  
  <pre><code>oXL.Selection.QueryTable
  oXL.Selection &lt;&gt; ""
  </code></pre>
  
  <p>where oXL is defined as Excel.Application.</p>
  
  <p>In Delphi ExcelApplication.Selection requires an index but in VB it doesn't.  I couldn't find anything similar in C# either.  I have tried ExcelApplication.ActiveCell which works as long as there is an existing query, otherwise Excel crashes.</p>
  
  <p>Does anyone know what this translates into for Delphi, or C#?</p>
  
  <p>Also if oXL.Selection is an interface, how can you perform oXL.Selection &lt;> ""?</p>
  
  <p>Thank you.</p>