Solved

Problem opening files in Excel from IE

Posted on 2004-03-24
6
683 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
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.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Suggested Courses

737 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