'blah.xls' cannot be accessed. The file may be read-only

Topics: Developer Forum, User Forum
Mar 27, 2012 at 9:14 PM
Edited Mar 28, 2012 at 12:22 AM

To PHPExcel Group -

Great job on this code - thanks!

Ran into an issue - on random Excel files I am creating on my website via PHPExcel - get the following error when trying to open the file in Excel:

 " 'blahfile.xls' cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding"


Server creating the file: Centos 4 linux, php 5.2.10, PHPExcel version 1.7.6

Client setup getting the error: Windows XP, Internet Explorer 8.0, Office 2003

Interesting observations:

1. Works fine using firefox (both on linux & xp) opening straight to Excel

2. Works fine saving in firefox then opening in Excel - does not work when saving file using IE and then opening directly in Excel

3. Looked at the file permission both on the linux server where an archive is kept and the PC - both are fine and identical to working files

3. Noticed one posting suggesting Excel service pack needed - so updated Excel 2003 to SP3 - still doesn't work

4. Not a consistent problem - most files work just fine, still trying to figure out common thread of bad files

Any thoughts? - php settings such as magic quotes, incorrect handling of slashes/symbols, etc?

appreciate any help!


Aug 17, 2014 at 4:20 PM
I am having a similar problem. If anyone found a solution for this please post it