473,841 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Conten tType = "applicatio n/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.a spx' 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 2774
It sounds like you need to specify the filename, with code like this:

Response.AddHea der("Content-Disposition",
"attachment;fil ename=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****@discuss ions.microsoft. com> wrote in message
news:C9******** *************** ***********@mic rosoft.com...
Hello,

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

-Create a HTML document.
-Use Response.Conten tType = "applicatio n/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.a spx' 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.Conten tType = "applicatio n/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.a spx' 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.AddHea der("Content-Disposition",
"attachment;fil ename=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****@discuss ions.microsoft. com> wrote in message
news:C9******** *************** ***********@mic rosoft.com...
Hello,

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

-Create a HTML document.
-Use Response.Conten tType = "applicatio n/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.a spx' 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
394
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 try to open up the file a message pops up "File Now Available", "select Read-Write or Cancel". Its almost like my code is changing the documents attributes. Am I doing something wrong in my code Any help would be great. Thanks Diann PS: I'm not quite sure why, but it seems that I have to use...
1
17422
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 and a lot of copying and pasting. I have designed a database for her which is intended to make things a lot easier; however, I don't have a lot of experience with Access and I find that designing the reports in Access is tedious. I want to be able to print the reports (which are simply based on...
6
13150
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 to a folder on our network as an Excel spreadsheet. I'm having trouble with my code at the point at which it hits ".ReadRecords" -- the module just runs and runs without generating anything. I've gotten this code to correctly save .rpt files without any data, but not with data, nor have I been...
3
3341
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 memory. I can see them in task manager in Process tab (as EXCEL). So the memory has been taken by excel objects and memory is being full. i want to delete or kill this objects which are in memory. i wrote the code as 'myexcel.quit()' , myexcel=nothing. but still it is in memory. pls tell me how to...
5
3010
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 have to do a full install of Excel on the server or just add the needed dll's to my ASP.net project. Terry
1
2572
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 read the excel values from excel sheet and need to show the values in crystal reports using c#.what i can do for populating the excel values into crystal reports.
14
6917
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 even know how to move from one to another. Any help would be appreciated. Here is my code. Dim oXL As Excel.Application Dim oWB As Excel.Workbook Dim oSheet As Excel.Worksheet
1
3046
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 called bugs and display them in an excel sheet report. I always get when trying to test it " 500 Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request." Can somebody help me please.
1
1583
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 it, I get the message that the Excel 97-2003 file is corrupted. Appreciate if you could help me with appropriate modifications to the below code. Thanks, Swamy
3
5948
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. what's the best way to achieve this. if someone can point me to an article or sample that will be real helpful. I am able to read a excel file and then do whatever I want but how to have 5 excel files open and then read and then consolidate. I am a bit confused here.
0
9709
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10303
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9446
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4085
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3140
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.