469,358 Members | 1,605 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Excel report with ASP.NET read-only problem

Hello,

To create a excel report from ASP.NET I do the folowing steps:

-Create a HTML document.
-Use Response.ContentType = "application/vnd.ms-excel"

Everything works fine and the excel report is shown inside the IE.
The problem is when I try to save the page, this message appears:

"'aspname.aspx' is read-only.To save a copy, click OK, then give the
workbook a new name in the Save As dialog box."

The strange thing is that accessing the same page through internet from
another computer the message does not appears.
I tried to modify the security settings in IE but nothing works.

Any idea?

Thank you

Óscar
Nov 19 '05 #1
3 2567
It sounds like you need to specify the filename, with code like this:

Response.AddHeader("Content-Disposition",
"attachment;filename=whatever.xls")

This code also specifies that the file should be opened externally (as an
'attachment') rather that inside the browser (as 'inline').

Here's more info:
http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Oscar F" <Os****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
Hello,

To create a excel report from ASP.NET I do the folowing steps:

-Create a HTML document.
-Use Response.ContentType = "application/vnd.ms-excel"

Everything works fine and the excel report is shown inside the IE.
The problem is when I try to save the page, this message appears:

"'aspname.aspx' is read-only.To save a copy, click OK, then give the
workbook a new name in the Save As dialog box."

The strange thing is that accessing the same page through internet from
another computer the message does not appears.
I tried to modify the security settings in IE but nothing works.

Any idea?

Thank you

Ëscar

Nov 19 '05 #2
This sounds similar to a recent problem I encountered where the user account
did not have full access to the Temporary Internet Files folder contents.

SSL? Look at the IE, Advanced setting for "Save encrypted files to disk"

"Oscar F" wrote:
Hello,

To create a excel report from ASP.NET I do the folowing steps:

-Create a HTML document.
-Use Response.ContentType = "application/vnd.ms-excel"

Everything works fine and the excel report is shown inside the IE.
The problem is when I try to save the page, this message appears:

"'aspname.aspx' is read-only.To save a copy, click OK, then give the
workbook a new name in the Save As dialog box."

The strange thing is that accessing the same page through internet from
another computer the message does not appears.
I tried to modify the security settings in IE but nothing works.

Any idea?

Thank you

Óscar

Nov 19 '05 #3
Great!!!! That's it.

Thank you very much.

"Steve C. Orr [MVP, MCSD]" wrote:
It sounds like you need to specify the filename, with code like this:

Response.AddHeader("Content-Disposition",
"attachment;filename=whatever.xls")

This code also specifies that the file should be opened externally (as an
'attachment') rather that inside the browser (as 'inline').

Here's more info:
http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Oscar F" <Os****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
Hello,

To create a excel report from ASP.NET I do the folowing steps:

-Create a HTML document.
-Use Response.ContentType = "application/vnd.ms-excel"

Everything works fine and the excel report is shown inside the IE.
The problem is when I try to save the page, this message appears:

"'aspname.aspx' is read-only.To save a copy, click OK, then give the
workbook a new name in the Save As dialog box."

The strange thing is that accessing the same page through internet from
another computer the message does not appears.
I tried to modify the security settings in IE but nothing works.

Any idea?

Thank you

Óscar


Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dianna K | last post: by
1 post views Thread by Steven Stewart | last post: by
5 posts views Thread by Terry | last post: by
14 posts views Thread by cj | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.