[PEAR-BUG] Bug #20207 [Com]: Excel reports that the spreadsheet is damaged
[email protected] ("currell") Mon, 3 Nov 2014 19:59:23 +0000 (GMT)
| Newsgroups | php.pear.bugs |
|---|---|
| Message-ID | <[email protected]> |
Edit report at http://pear.php.net/bugs/bug.php?id=20207&edit=1
ID: 20207
Comment by: currell
Reported By: currell at nettwerk dot com
Summary: Excel reports that the spreadsheet is damaged
Status: Open
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Windows 7
Package Version: 0.9.3
PHP Version: 5.5.9
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2014-07-31 14:24:23] 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-02-26 18:11:15] jramsey_dc
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.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=20207&edit=1