View Full Version : Name a Excel Spreadsheet
hughesmi
08-17-2005, 11:04 AM
Hello.
Is there a way i can add a name to an excel spreadsheet. I know I can send data to excel usuing this
Response.ContentType = "application/vnd.ms-excel"
neocool00
08-17-2005, 09:18 PM
Do you mean name the sheet or the file or something else?
hughesmi
08-18-2005, 10:08 AM
yes, I mean the sheet.
Cyberlord
08-18-2005, 04:16 PM
Here is your answer:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q288130
This is important for you:
'Rename Sheet1 to "Orders", rename Sheet2 to "Totals" and remove Sheet3
Set oOrdersSheet = oSS.Worksheets(1)
oOrdersSheet.Name = "Orders"
Set oTotalsSheet = oSS.Worksheets(2)
oTotalsSheet.Name = "Totals"
oSS.Worksheets(3).Delete
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.