• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

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
0
webhsu
Asked:
webhsu
  • 4
  • 3
  • 2
1 Solution
 
applekannaCommented:
set the contect type as "text/vnd.msexcel"
0
 
applekannaCommented:
typo there

response.setContentType("application/vnd.ms-excel")
0
 
applekannaCommented:
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now