asp to excel

M

Mike D

I know everyone says their problem is weird so ...

I have a weird problem. I am trying to save an asp file as an excel
spreadsheat. The table displays fine in html but when I add
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename="test.xls;"

I get:
Internet Explorer cannot download 2004 from ricweb3.mydomain.com

Internet explorer was not able to open this Internet site. The requested
site is either unavailable or cannot be found.
Please try again later.

Thanks for any help.

Mike
 
R

Ray Costanzo [MVP]

Did you copy and paste that code? If so, you have a syntax error.
filename=" <-- no quote

Ray at work
 
M

Mike D

I have tried this :
Response.AddHeader "Content-Disposition", "attachment; filename=test.xls;"
and
response.AddHeader "content-disposition", "filename=test.xls"
and
response.AddHeader "content-disposition", "inline; filename=test.xls"
Still same problem. I have other pages on the same server downloading
excel. I don't know what is missing.

Mike
 
M

Mike D

I figured it out. The excel file did not like the way I was calling the
page. I had it as a pop-up from my initiating page. When I changed it to a
straight hyperlink it works fine. Go figure.

Thanks for your replies.

Mike
 

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,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top