Home » File Formats » Spreadsheet_Excel_Writer » Bug #8967
Excel XP crashes when generated worksheet have many cell merges
Details
| Submitted | 2006-10-11 12:53 UTC |
|---|---|
| From | paladin80 at gmail dot com |
| Status | Verified |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 5.0.4 |
| OS | win XP |
| Roadmaps | (Not assigned) |
Comments
[2006-10-11 12:53 UTC] paladin80 at gmail dot com
Description:
------------
Excel XP crashes when generated worsheet have many column merges.
Merges are become bugous when spreadsheet have about 400 of them. When count of merges is more than 700, Excel XP crushes.
Test script:
---------------
<?php
include_once "Spreadsheet/Excel/Writer.php";
$xls =& new Spreadsheet_Excel_Writer();
$xls->send("table.xls");
$sheet =& $xls->addWorksheet('table');
for($i=0; $i<40; $i++){//change to $i<100 to get excel crush
for($j=0;$j<20;$j+=2){
$sheet->setMerge($i, $j, $i, $j+1);
}
}
$xls->close();
?>
Expected result:
----------------
A blank table, each cell must have colspan=2 and rowspan=1.
Actual result:
--------------
A blank table, each cell have colspan=2, but many cells from column "M" have rowspan=2.
When I extend the table up to 100 rows, I get the excel crush.
[2006-10-11 13:48 UTC] paladin80 at gmail dot com
Just avoided problem by using mergeCells() instead of setMerge().