Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EXCEL sheets.
Message
De
14/01/2002 13:21:32
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
 
 
À
14/01/2002 13:01:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00604451
Message ID:
00604460
Vues:
30
lo_Excel = CREATEOBJECT("Excel.Application")
lo_Excel.Workbooks.ADD()
FOR EACH lo_Sheet IN lo_Excel.Sheets
   ? lo_Sheet.NAME
ENDFOR
lo_Excel.ActiveWorkbook.CLOSE()
lo_Excel.QUIT()
>I am doing some automation with excel and I am not sure how to find out how many sheets are in an excel workbook.
>
>ex:
>loExcel = createobject("excel.application')
>WITH loExcel
> .workbooks.sheets.count
>ENDWITH
>
>is the above correct. also how can I find out the name of each sheet.
>
>The problem is, I have to pick up these work sheets from the server each week and there are three sheets in the workbook and the name of the sheets may change, so I would like to dynamically figure out the name of the sheets and rename them. I know how to rename them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform