export to Excel - multiple sheets & renaming sheets

C

Carl Corcoran

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!
 
B

Bob Barrows

Carl said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top