Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #20207 Excel reports that the spreadsheet is damaged
Submitted: 2014-02-26 23:11 UTC
From: jramsey_dc Assigned:
Status: Feedback Package: Spreadsheet_Excel_Writer (version 0.9.3)
PHP Version: 5.5.9 OS: Windows 7
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 32 - 14 = ?

 
 [2014-02-26 23:11 UTC] jramsey_dc (Jason Ramsey)
Description: ------------ This happens after a given amount of data is put into the spreadsheet. The simplest example I can come up with is below: the letter "t" in the first cell of a given row. Once you populate the 237th row, you will start getting the notice. Excel will "fix" the file and open it up. A binary comparison of the two files shows that byte 25 is the only difference. =============================== unix-command: cmp test.xls fixed.xls -b test.xls fixed.xls differ: byte 25, line 1 is 73 ; 76 > Test script: --------------- <?php require_once("OLE.php"); require_once("Spreadsheet/Excel/Writer.php"); $fname='test.xls'; $workbook = new Spreadsheet_Excel_Writer($fname); $worksheet=&$workbook->addWorksheet($name); $maxRows=237; for($rowNum=0; $rowNum<$maxRows; $rowNum++) { $worksheet->writeString($rowNum,0,'t'); } $workbook->close(); ?> Expected result: ---------------- You should get an output file "test.xls". This file should have the letter 't' in column 'A' for 237 rows. Opening the file should not show any warnings. Actual result: -------------- The test script will output a file "test.xls". Opening this file on a Windows 7 machine in Microsoft Office (we tested 2003, 2003 SP3, and 2010) will show an error about the file being corrupt, provide recovery options and instruct the user to save the file.

Comments

 [2014-07-31 18:24 UTC] dcd (Danny Dcd)
Have you installed OLE-1.0.0RC2? -> Go back to RC1 It seems to be an error in OLER RC2. I hope this will help
 [2014-11-04 00:58 UTC] currell (Jason Currell)
NOTE: The problem does not show up on a Mac. We are mainly a mac shop and I just had one of my accountants (who has a PC) run into this issue. Works fine on our Mac's but throws the error on Windows 7 PC's.
 [2016-08-23 06:51 UTC] sanmai (Alexey Kopytko)
-Status: Open +Status: Feedback
Thank you for taking the time to report a problem with the package. This problem may have been already fixed by a previous change that is in the SVN of the package. Please checking out the SVN repository of this package and upgrade svn checkout svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk pear upgrade package2.xml or pear upgrade package.xml If you are able to reproduce the bug with the latest SVN, please change the status back to "Open". Again, thank you for your continued support of PEAR.
 [2016-08-23 06:52 UTC] sanmai (Alexey Kopytko)
Instead of svn checkout use: git clone https://github.com/pear/Spreadsheet_Excel_Writer.git