Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing name of Excel sheet
Message
From
26/07/2005 20:18:49
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035988
Message ID:
01036055
Views:
16
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".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform