title: How to loop through all excel sheets while opening an excel file from Oracle Forms Builder?
body: <p>I want to reaf an excel file with the help of Client_OLE2 in my Oracle forms.
  I succeed to do that if the excel just has one sheet because this sheet is the activesheet, but if I have several sheets in my excel,I am not able to read the desire sheet.</p>
  
  <pre><code>        ----------------Get the file to open        ---------------------------
  
  v_fName := :upload.ti_file_name_upload;
  
  IF ( v_fName IS NOT NULL ) THEN 
  
   clear_form ( no_validate );
  
      --------------INITIATE EXCEL APPLICATION---------------------------
  
  application := client_OLE2.create_obj('Excel.Application'); 
      client_OLE2.set_property(application,'Visible', 'false');
  
  ----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
  
      workbooks := client_OLE2.Get_Obj_Property(application, 'Workbooks');
  
      ----------------OPEN REQUIRED WORKBOOK-----------------------------
  
      args := client_OLE2.CREATE_ARGLIST;
      client_OLE2.add_arg(args,v_fName); 
      workbook := client_OLE2.GET_OBJ_PROPERTY(workbooks,'Open',args);
      client_OLE2.destroy_arglist(args);
  
  ----------------OPEN REQUIRED WORKSHEET----------------------------
  
      worksheets := client_OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
      worksheet := client_OLE2.GET_OBJ_PROPERTY(application,'activesheet'); 
  
  ----------------Specify columns that must be read------------------
  </code></pre>
  
  <p>Thank you!</p>