From:  windy341995@outlook.com ("barbarianking")
Date:  30 Dec 2015 14:58:12 Hong Kong Time
Newsgroup:  news.php.net/php.pear.bugs
Subject:  

[PEAR-BUG] Bug #2942 [Com]: Problems with files with over 200 row / or 30kb of filesize

NNTP-Posting-Host:  null

, ); before rewriting to a cell. This eliminated all of my problems. ------------------------------------------------------------------------ [2009-04-01 10:07:51] tomaszrup Miso's patch work good, but binary file generated by my test and generated by OO.o 3.0.1 are different. [tomek@localhost tmp]$ hexdump test1.xls > test1.hex [tomek@localhost tmp]$ hexdump test1_miso.xls > test1_miso.hex [tomek@localhost tmp]$ diff test1.hex test1_miso.hex 62c62 < 0000560 7473 00fc 2020 00c9 0000 00c9 0000 0013 --- > 0000560 7473 00fc 2017 00c9 0000 00c9 0000 0013 575,576c575,576 < 0002570 003a 0031 0039 0013 3201 3000 3000 3900 < 0002580 2d00 3000 3100 003c 001a 0000 002d 0030 --- > 0002570 003a 0031 0039 0013 3201 3000 3c00 2300 > 0002580 0100 0030 0039 002d 0030 0031 002d 0030 776,777c776,777 < 0003260 0000 0000 3a00 c4f5 b2b5 01c9 3a00 c4f5 < 0003270 b2b5 01c9 0000 0000 0000 0000 0000 0000 --- > 0003260 0000 0000 ef00 f0c5 b2b8 01c9 ef00 f0c5 > 0003270 b2b8 01c9 0000 0000 0000 0000 0000 0000 [tomek@localhost tmp]$ hexdump test2.xls > test2.hex [tomek@localhost tmp]$ hexdump test2_miso.xls > test2_miso.hex [tomek@localhost tmp]$ diff test2.hex test2_miso.hex 62c62 < 0000560 7473 00fc 2020 0112 0000 0112 0000 0013 --- > 0000560 7473 00fc 2018 0112 0000 0112 0000 0013 575,576c575,576 < 0002570 3a00 3100 3600 0800 0100 0030 0030 003a < 0002580 0030 0032 003a 003c 0005 3100 3700 0a00 --- > 0002570 3a00 3100 3600 0800 0100 0030 0030 003c > 0002580 000d 3a01 3000 3200 3a00 3100 3700 0a00 839,840c839,840 < 0003660 0000 0000 3a00 c4f5 b2b5 01c9 3a00 c4f5 < 0003670 b2b5 01c9 0000 0000 0000 0000 0000 0000 --- > 0003660 0000 0000 ef00 f0c5 b2b8 01c9 ef00 f0c5 > 0003670 b2b8 01c9 0000 0000 0000 0000 0000 0000 ------------------------------------------------------------------------ [2009-04-01 09:38:29] tomaszrup Test file: require_once "Spreadsheet/Excel/Writer.php"; class xls { /** * @var Spreadsheet_Excel_Writer */ private $xls; /** * @var Spreadsheet_Excel_Writer_Worksheet */ private $sheet; private $row = 0; private $colDateMasks; private function init($filename) { $this->xls = new Spreadsheet_Excel_Writer($filename); $this->xls->setVersion(8); $this->sheet =& $this->xls->addWorksheet('Test'); $this->sheet->setInputEncoding('iso-8859-1'); } private function createRow($cols) { for($col = 0; $col < $cols; $col++) { $content = date($this->colDateMasks[$col], strtotime('2009-01-01 00:00:00') + ($this->row + $col)); $this->sheet->writeString($this->row, $col, $content); } $this->row++; } private function finalize() { $this->xls->close(); } public function test($filename, $cols, $rows, $colDateMasks) { $this->colDateMasks = $colDateMasks; $this->init($filename); for($row = 0; $row < $rows; $row++) { $this->createRow($cols); } $this->finalize(); } } $xls = new xls; $xls->test('test1.xls', 1, 201, array('Y-m-d H:i:s')); unset($xls); $xls = new xls; $xls->test('test2.xls', 2, 137, array('Y-m-d H:i:s', 'H:i:s')); This code produce 2 files without letters. First file broken on row 201. Second on row 137. Both files have a size above 14k My configuration: Linux PHP 5.2.9 PEAR::Spreadsheet_Excel_Writer 0.9.1 ------------------------------------------------------------------------ [2008-11-24 14:00:20] mek7 valli, thank you very much, you saved me a day and my hair, wow! :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=2942 -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=2942&edit=1
Edit report at http://pear.php.net/bugs/bug.php?id=2942&edit=1

 ID:               2942
 Comment by:       barbarianking
 Reported By:      windy341995 at outlook dot com
 Summary:          Problems with files with over 200 row / or 30kb of
                   filesize
 Status:           Closed
 Type:             Bug
 Package:          Spreadsheet_Excel_Writer
 Operating System: Linux
 PHP Version:      4.3.9
 Assigned To:      alan_k
 New Comment:

I faced this problem before with
http://cocland.com/base-layouts/top-clash-of-clans-base-layouts


Previous Comments:
------------------------------------------------------------------------

[2009-10-06 08:00:59] alan_k

-Status: Open +Status: Closed -Assigned To: +Assigned To: alan_k
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. The patch at the end of this bug has been applied http://pear.php.net/bugs/bug.php?id=1572 Tested and working ------------------------------------------------------------------------ [2009-08-10 21:26:52] jrble819 I has some success using writeBlank(,