Solved

Problem opening files in Excel from IE

Posted on 2004-03-24
6
656 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

It's here again; Microsoft is launching a new version of Internet Explorer: Internet Explorer 9, with noticeable changes on its interface, functions and new tools. As they say on its promotional video: "It's time to play, on a more beautiful web", f…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
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.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

910 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now