Solved

Problem opening files in Excel from IE

Posted on 2004-03-24
6
673 Views
Last Modified: 2008-03-06
I have a Java Servlet which outputs CSV files on the fly to the browser.  I have set the following line

response.setHeader("Content-Disposition", "attachment; file;filename="+filename.toString());


so that I get the open/save dialog box appear in the browser.  If I choose save (then open the file afterwards) it works fine but if I choose open
I get an error in Excel saying that the file could not be found.



0
Comment
Question by:twist_
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:Asta Cu
ID: 10668222
Don't know your version or environment; but there are some problems after opening Excel files in IE, here's the link and additional insights
http://support.microsoft.com/default.aspx?scid=kb;en-us;321778&Product=xlw

In fact, because we don't know enough about the versions, this may help in terms of choosing applicability:
http://support.microsoft.com/search/default.aspx?InCC_hdn=true&Catalog=LCID%3D1033%26CDID%3DEN-US-KB%26PRODLISTSRC%3DON&withinResults=&QuerySource=gASr_Query&Product=xlw&Queryc=open+files+in+internet+explorer&Query=open+files+in+internet+explorer&KeywordType=ALL&maxResults=25&Titles=false&numDays=&InCC=on

Path missing or incorrect?

0
 

Author Comment

by:twist_
ID: 10687694
I only have this problem when opening files in Excel.  If I set the content type to Word for instance the file will open fine in Word.

If Excel is already open when you click the file in IE then the file opens ok too.

The only time I get a problem is when IE fires Excel to open and then trys to open the file.
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 10705084
I've sent this to another Excel Expert to see if he can help you, I've given the insights I can think of.  The only other thought I had is to check your file types and change the default file type assignments; but really unclear if that'll resolve for you or not.
0
 

Accepted Solution

by:
twist_ earned 0 total points
ID: 10722794
I have solved the problem

I found the answer here:

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=7&t=011811


All I had to do was add this line to my servlet and IE behaves itself:

response.setHeader("Cache-Control", "public");
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 10723511
Terrific!  Thanks for sharing the solution.  I will ask our Page Editor, COBOLdinosaur to refund your points and PAQ this item.

This will now help others who may face the same problem.

":0) Asta
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem I downloaded the Microsoft Internet Explorer 9 Beta, today, to give it a test drive and maybe write a review for the site, and it failed miserably and got stuck in a crash restart loop. The error message given is as illustrated below i…
I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question