Solved

Problem opening files in Excel from IE

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How many times have you been browsing the internet, with multiple tabs open, and closed the wrong one? Have you ever clicked 'Close all tabs' instead of 'Close current tab' ? Internet Explorer 8 now brings to you, what Firefox has had for a wh…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

757 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

23 Experts available now in Live!

Get 1:1 Help Now