title: select sheets excel
body: <p>XE3 use delphi with excel ole automation.
  With this code I open and read / write in the cells, but I can not select different sheets (Sheet1, Sheet3 etc.)</p>
  
  <pre><code>begin
  L_vi.Caption: = 'D: \ bd1 \ file_supporto \ Vi.xls';
  Ex: = createoleobject ('Excel.Application');
  Ex.visible: = true;
  Ex.workbooks.open (L_vi.Caption);
  Ex.cells [1,1]: = 'test';
  Sheets: = Ex.Workbooks [1]. Worksheets ['Sheet3'];
  </code></pre>
  
  <p>Can you help?</p>
  
  <p>thanks</p>
  
  <p>P.S.
  i resolved so:</p>
  
  <pre><code>Ex.Workbooks [1]. Worksheets ['Sheet3'].select;
  </code></pre>
  
  <p>thanks.</p>