Exporting to an Excel Database

Hey,

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?

Thanks,

Weber
webhsuAsked:
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.

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

response.setContentType("application/vnd.ms-excel")
0
applekannaCommented:
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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

http://www.tek-tips.com/gviewthread.cfm/pid/426/qid/536425

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

<%
Response.ContentType = "application/vnd.ms-excel"
%>

to

<%
response.setContentType("application/vnd.ms-excel");
%>

I think that should just about do it ;-)
0

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
jimmackCommented:
Thanx.

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 ;-))
0
webhsuAuthor Commented:
office 2k.
0
jimmackCommented:
Thank you ;-)
0
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
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.