Link to home
Start Free TrialLog in
Avatar of gtrapp
gtrapp

asked on

An Error occurs when trying to open an Excel file from web page

I'm having difficulty opening a Microsoft Excel 2003 (XLS) file when using IE 8.  Here are the errors I get:

Microsoft Excelcannot access the file 'https://site/file/contacts.xls'. There are several possible reasons:

The file name or path does not exist.
The file being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.

The site is an ASP.Net 2.0 site, using IIS 6.0. I have Office 2007 installed on my PC, which is using Windows 7.0. I am using the <a href a> tag to open the file. The file does exist. Are there security settings that I need to take to allow this file to open?

Thanks,
Avatar of RouterRat
RouterRat
Flag of United States of America image

I believe if conditions would be like this;

The file being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.

You would be still able to open it but it would say read-only.

As you are having an access error, you should make sure you have the rights for it, for example if it is a sharepoint site or a site that you login w/username and password.

Make sure your Windows Firewall/ 3rd party firewall/web shield/http shield etc. allows it. or test it without these things are running.

Test the same thing on a mac to see what's happening (this helps alot if you are testing functuonality of websites)

Of course do all these after you make sure you know how the file server works, and you have rights for it and now you know that it is a problem with the local machine you are using.
Avatar of gtrapp
gtrapp

ASKER

The document does not open at all. This is a new file, and not a SharePoint file. On the site, I can download PDF files with no problems.  I don't have a Mac.

Would the problem be related to the site using HTTPS?
Avatar of gtrapp

ASKER

What about using a different format for the XLS file? Open Office Document, XML or Text?  
When you right-click on the link to the xls, and Save it as a file, can you then open the file locally?
Avatar of gtrapp

ASKER

I can not open the XLS locally. I have tested CSV, XLSX, and XLS and this failed to open. When I select "Save as Target..." I see:

"Unable to download contacts.xls from www.site.com. The file could not be written to the cache."

When I click on the link for XML, this file opens up and I can save it locally.

Oddly, once the XLS, XLSX and CSV files where download successfully. Then, subsequent times, they failed.
ASKER CERTIFIED SOLUTION
Avatar of sjklein42
sjklein42
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gtrapp

ASKER

I looked under the HTTP Headers and see what you are talking about. Cache-Control: no-cache, and Pragma: no-cache are in the custom HTTP headers. I removed these and the XLS file was able to downloaded,.