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

Bug #8967 Excel XP crashes when generated worksheet have many cell merges
Submitted: 2006-10-11 07:53 UTC Modified: 2006-10-13 07:25 UTC
From: paladin80 at gmail dot com Assigned:
Status: Open Package: Spreadsheet_Excel_Writer (version 0.9.1)
PHP Version: 5.0.4 OS: win XP
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: paladin80 at gmail dot com
New email:
PHP Version: Package Version: OS:

 

 [2006-10-11 07:53 UTC] paladin80 at gmail dot com (Serghei V. Burtsev)
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.

Comments

 [2006-10-11 08:48 UTC] paladin80 at gmail dot com
Just avoided problem by using mergeCells() instead of setMerge().
 [2006-10-13 07:25 UTC] mj (Martin Jansen)
Spam
 [2006-10-13 07:25 UTC] mj (Martin Jansen)
Err, no spam. Sorry.
 [2008-11-06 09:04 UTC] mek7 (Matej Kurpel)
Man, thank you, you have saved me a lot of headache. It was indeed sufficient to replace "setMerge" with "mergeCells". Very confusing bug...
 [2009-10-14 09:29 UTC] sunny (Sanyasi Rao)
Thanks Serghei! You have saved me a lot of time by giving the solution.