By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

asp to excel

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
4 Replies


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

Ray at work

"Mike D" <Mi***@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
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

Jul 22 '05 #2

P: n/a
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

"Ray Costanzo [MVP]" wrote:
Did you copy and paste that code? If so, you have a syntax error.
filename=" <-- no quote

Ray at work

"Mike D" <Mi***@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
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


Jul 22 '05 #3

P: n/a
Show all the relevant code

Do you have a BinaryWrite in there somewhere?

Jeff
"Mike D" <Mi***@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
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

"Ray Costanzo [MVP]" wrote:
Did you copy and paste that code? If so, you have a syntax error.
filename=" <-- no quote

Ray at work

"Mike D" <Mi***@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
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


Jul 22 '05 #4

P: n/a
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
"je**@removeemergencyreporting.com" wrote:
Show all the relevant code

Do you have a BinaryWrite in there somewhere?

Jeff
"Mike D" <Mi***@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
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

"Ray Costanzo [MVP]" wrote:
Did you copy and paste that code? If so, you have a syntax error.
filename=" <-- no quote

Ray at work

"Mike D" <Mi***@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
>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


Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.