Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Name a Excel Spreadsheet

    Hello.

    Is there a way i can add a name to an excel spreadsheet. I know I can send data to excel usuing this

    Code:
    Response.ContentType = "application/vnd.ms-excel"
    Kind regards,
    Mike Hughes

  • #2
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you mean name the sheet or the file or something else?

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts
    yes, I mean the sheet.
    Kind regards,
    Mike Hughes

  • #4
    New Coder
    Join Date
    Aug 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is your answer:

    http://support.microsoft.com/default...;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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •