asp to excel

M

Mike D

I am using asp to create an excel file on the fly using:
Response.ContentType="application/x-msdownload"
Response.AddHeader "Content-Disposition", "attachment; filename=" &
strRunIDName & ".xls;"

This opens the file download dialogue box. When I click open it opens
another identical dialogue box where I have to click open again. How do I
open with only one click. Is this an IE thing or something in the asp code?

Mike
 
P

PR

Try this as your very first line on the asp page:

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

I use ASP to create a large table of data. I then include that line at the
very top of the asp page. IE recognizes it and opens the page in excel
(within a browser). From what I understand, as long as you're creating an
html table, excel will handle it nicely.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top