Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing name of Excel sheet
Message
De
26/07/2005 20:18:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01035988
Message ID:
01036055
Vues:
14
Thank you to both of you! They both work fine (in the XL5 version of COPY, not XLS). I owe you both a beer!
- John


>>Hey FoxFolx!
>>
>>I know how to COPY TO type XLS. Is there any way to set the name of Sheet 1 at that time or after the fact? The Sheet 1 name *has* to be a specific name for this project I'm doing.
>>
>>Thanks in advance!
>
>If for some reason Borislav's answer does not work for you, using automation you can re-name the sheet after copying the file
>
>
>loExcel			= Createobject('Excel.Application')
>loWorkBook		= loExcel.Workbooks.Open('fullFileName.XLS')
>loSheet			= loWorkBook.Sheets(1)
>loSheet.Name		= 'MyNewName'
>loWorkBook.Save()
>loExcel.Quit()
>
-- John Kiernan
"Maybe Amelia Earhart was just stealing the plane".
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform