Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renaming an excel sheet
Message
De
19/04/2005 04:52:50
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
01006084
Message ID:
01006088
Vues:
31
Try This;

oLeApp=CREATEOBJECT("Excel.Application")
oleapp.visible = .T.
OWrkbk = oLeApp.workbooks.add
owrkbk.sheets(1).Name = "New"

So if you want to rename more than one you can loop around the owrkbk.Sheets.Count value.

HTH

Jon

>hi all,
>i am trying to rename an excel sheet, several actually as it will be in a loop, to the parameter mcusname but i have tried a lot of different ways without joy. i have included a few examples so you can see what track i was going down, anyone any idea whats going wrong?
>
>OleApp.Sheets("Sheet1").Name = "mcusname"
>OleApp.Sheets("Sheet1").Name = &mcusname
>OleApp.Sheets("Sheet1").Name = ("mcusname")
>OleApp.Sheets("Sheet1").Name(mcusname)
>
>Slán
>~M
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform