Exporting to an Excel Database

webhsu
webhsu used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
set the contect type as "text/vnd.msexcel"
typo there

response.setContentType("application/vnd.ms-excel")
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Author

Commented:
I actually have exported data to excel already. just need to split it into different workbooks within the same excel session.
Commented:
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 ;-)

Commented:
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 ;-))

Author

Commented:
office 2k.

Commented:
Thank you ;-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial