Exporting to an Excel Database


I retrieve data from a database, put the information in a table(html) and allow the user of the application to view it in excel if he/she so chooses. I would like to put different tables into different workbooks inside excel.

Anyone have a suggestion?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

set the contect type as "text/vnd.msexcel"
typo there

Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

webhsuAuthor Commented:
I actually have exported data to excel already. just need to split it into different workbooks within the same excel session.
Try this one:


Scroll down to May 15 2003.  Tarwn explains how to do this using ASP, but apart from changing:

Response.ContentType = "application/vnd.ms-excel"



I think that should just about do it ;-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

I'm glad it's worked.  Could you confirm which versions of Excel this works with please?  (I'm a Linux user so it's a bit difficult to check ;-))
webhsuAuthor Commented:
office 2k.
Thank you ;-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.