export to Excel - multiple sheets & renaming sheets

Discussion in 'ASP General' started by Carl Corcoran, Nov 12, 2003.

  1. I'm developing a website for work that exports some reports to excel.
    I am using the...

    Response.AddHeader "Content-Disposition","attachment;filename=report.xls"
    Response.ContentType = "application/vnd.ms-excel"

    ....strategy to do this. It works wonderfully except I cannot figure
    out how to do two things:

    1) specify a name for the worksheet that's exported (it names the
    worksheet "blah.asp?q=123" when the user wants to see "Monthy Quotas"

    2) generate multiple worksheets. The exported spreadsheet should have
    about 6 tabs on the bottom that all contain different information in
    the same report.

    Please help!
    Carl Corcoran, Nov 12, 2003
    #1
    1. Advertising

  2. Carl Corcoran

    Bob Barrows Guest

    Carl Corcoran wrote:
    > I'm developing a website for work that exports some reports to excel.
    > I am using the...
    >
    > Response.AddHeader
    > "Content-Disposition","attachment;filename=report.xls"
    > Response.ContentType = "application/vnd.ms-excel"
    >
    > ...strategy to do this. It works wonderfully except I cannot figure
    > out how to do two things:
    >
    > 1) specify a name for the worksheet that's exported (it names the
    > worksheet "blah.asp?q=123" when the user wants to see "Monthy Quotas"
    >
    > 2) generate multiple worksheets. The exported spreadsheet should have
    > about 6 tabs on the bottom that all contain different information in
    > the same report.
    >
    > Please help!



    Create a spreadsheet in Excel that has the features you want, then save it
    as html. Look at the source to see how the features are implemented.

    HTH,
    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows, Nov 12, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VK
    Replies:
    1
    Views:
    1,077
    Steve C. Orr [MVP, MCSD]
    Apr 15, 2005
  2. =?Utf-8?B?U3JpZGhhcg==?=

    using Microsoft Excel image for Export to Excel button

    =?Utf-8?B?U3JpZGhhcg==?=, Dec 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,103
    =?Utf-8?B?U3JpZGhhcg==?=
    Dec 9, 2005
  3. Rohan
    Replies:
    2
    Views:
    318
    Neil Cerutti
    Aug 7, 2007
  4. RichpU

    Export to multiple excel sheets

    RichpU, Dec 9, 2004, in forum: ASP General
    Replies:
    1
    Views:
    185
    Melissa
    Jan 3, 2005
  5. Pk
    Replies:
    1
    Views:
    178
    Ray Costanzo [MVP]
    Jul 17, 2006
Loading...

Share This Page