472,330 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,330 software developers and data experts.

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 2683
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dianna K | last post by:
I am opening, reading and extracting an Excel spreadsheet in .Net (VB). It seems to work fine, however, when I am finished and I open up Excel and...
1
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas...
6
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it...
3
by: hari krishna | last post by:
hi, I am generating excel reports through vb.Net. After creating excel.application and the report is generated, each report leaves Excel in...
5
by: Terry | last post by:
I am building an ASP.net application which will generate a formatted Excel report. Is there a way I can using the Excel on the client pc? Do I...
1
by: srinivas | last post by:
Hi , I am a dotnet developer.I am working on crystal reports.My requirement is like this I have an excel sheet with some values.I need to...
14
by: cj | last post by:
I want to start a workbook and add sheets to it one at a time. Right now my code opens a workbook and it has 3 sheets alread in it and I don't...
1
by: Sport Girl | last post by:
Hi everybody , i have the task of developing in Perl a script that retrieves data from 3 tables ( bugs, profiles, products) from a MySQL database...
1
by: Dallas Developer | last post by:
Hi, Below is the code I have tried. I get an xls file with the right name in a dialog box to open, save or cancel. However, when I try to open...
3
by: stephen | last post by:
Hi, I have 5 excel files and they have multiple sheets. I have to read (say sheet 3) of each of the 5 excel files and consolidate them into one....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.