views:

1972

answers:

5

I am using Java Struts, sending it to user using the following codes

response.setContentType("application/vnd.ms-excel"); 
response.setHeader("Content-Disposition", "attachment;filename=" + fileFullName);

Firstly I hope that this is the correct place for my question... :) I hope that you can help me.

The error message I get when I try to open a file from Internet Explorer is

"C:\Documents and Settings\USERNAME\Local Settings\Temporary Internet
Files\Content.IE5\QXJ0P436\btbillsdfjlsfjk.csv' could not be found"

I am trying to "Open" the csv file format into Excel. It allows me to "Save" the file to which ever directory I want but I don't want to do that, I would just like to open the file. This has always worked in the past so I'm now wondering why the file is 'missing'.

Any ideas?

Thanks in advance.

+1  A: 

Check Tools - Internet Options - General Tab - Temporary Internet files - Settings... - And check that you have enough space allocated to hold the csv file and that the path looks like the one you posted.

jakber
A: 

Are you downloading over HTTPS? IE can be quite buggy if the headers aren't similar to Expires: 0, Pragma: cache, Cache-Control: private

Greg
A: 

This isn't really a programming related question, but anyways, this usually happens due to insufficient user permissions.

You might find better support at a Windows support website.

Josh
A: 

I was having an issue similar to this and discovered that the problem was IE had issues when there was a space in the name of the file. It also had issues if the content-disposition was an attachment versus an inline file.

Content-Disposition: inline;filename=NoSpacesFileName.csv

All other browsers worked fine over HTTPS. Changing the other headers did not affect my issue.

A: 

Are you downloading over HTTPS? IE can be quite buggy if the headers aren't similar to Expires: 0, Pragma: cache, Cache-Control: private

Greg, your answer fixed my problem. Thanks.

Web Site Helper