Cant open spreadsheets created under Windows (XP with Apache)

Topics: Developer Forum, User Forum
Sep 10, 2012 at 4:31 PM

Hi All.

All of the spreadsheets I'm creating using PHPExcel under windows are coming out unreadable. Ive tried lots of different versions of PHP, I've tried using PCLZIP. I've tried using old versions of the php_zip extension on PHP 5.2. Nothing works. On linux, they pop out fine.


On version 5.2.17 of PHP the spreadsheet gets generated with php_zip.dll extension disabled so it is being utilised. But there are diffrences in the zip files. Stuff like

<c.r="J11".s="11" (windows)


<c r="J11" s="11" (linux)

so extra dots. and also

<a:font script="Jpan" typeface="MS Pゴシック"/> (windows)

<a:font script="Jpan" typeface="&#xFF2D;&#xFF33; &#xFF30;&#x30B4;&#x30B7;&#x30C3;&#x30AF;"/> (linux)

I'm at my wits end, I would really like for this to work. When I compare the un-archived files there are differences, so it does appear to be a problem with the archive, but why doesn't PCLZIP work?

Im using the latest stable realease of PHPExcel. Please help.

Windows XP, Apache 2.2.22, PHP5.2.17 / PHP5.3.16 / PHP5.4.6 (TS)


Sep 12, 2012 at 1:38 PM

To give some more info the spreadsheets containing unreadable content do actually open if you click yes to agree to trusting content from unkown source - its just the formatting that is lost, all the data is present in the spreadsheets (reports). Am almost certain this is something to do with the way the archive is being generated. Please help, this is so close to working. Dave

Sep 14, 2012 at 6:43 AM

Is this happening even just running the files in the /Tests directory? This is hard to understand as the files are correctly generated with the : namespace separator, and as UTF-8 before being zipped by PHPExcel; so I can't understand how anything in PHP can then change the content of those zips.

Sep 18, 2012 at 3:37 PM

Hi Mark,


Thanks for the answer. As far as running the tests goes, all the tests run okay with the exception of Excel2003XMLReader.php. When I try to open the Excel2003XMLReader.xlsx sheet that get generated, I get the following error :

Removed Records: Merge cells from /xl/worksheets/sheet1.xml part

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <recoveryLog xmlns="">
  <summary>Errors were detected in file 'C:\www\default\www\phpexceltests\Tests\Excel2003XMLReader.xlsx'</summary>
- <removedRecords summary="Following is a list of removed records:">
  <removedRecord>Removed Records: Merge cells from /xl/worksheets/sheet1.xml part</removedRecord>
The code that I'm having trouble with is quite complicted and used conditional formatting and extensive styling. The fact that it runs fine on Linux but not on windows worries me and the only diffrences I can fin in the outputted files appear to be in the styles.xml file within the unarchived .xlsx bundle.
Oct 15, 2012 at 9:19 AM

FYI this is fixed in 1.7.8 :) thanks