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

Bug #7315 Freeze Panes - error with only 2 values
Submitted: 2006-04-05 13:31 UTC
From: taggartm at gmail dot com Assigned: progi1984
Status: Feedback Package: Spreadsheet_Excel_Writer
PHP Version: 5.1.2 OS: Windows 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:
2012-01-26 09:31 UTC
Package:
Bug Type:
Summary:
From: taggartm at gmail dot com
New email:
PHP Version: Package Version: OS:

 

 [2006-04-05 13:31 UTC] taggartm at gmail dot com (Michael Taggart)
Description: ------------ The documentation states that this should work to freeze the first 6 rows of a worksheets. $worksheet->freezePanes(array(6, 0)); This actually generates an error saying it can't find reference 2 and 3. If you specify all the values then it works just fine. $worksheet->freezePanes(array(6, 0, 0, 0)); Either the code needs to be changed to test how many values are present in the array or the documentation needs to be changed to say it needs all the values.

Comments

 [2009-08-12 13:01 UTC] progi1984 (Franck Lefevre)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: progi1984
Thank you for taking the time to report a problem with the package. Unfortunately you are not using a current version of the package -- the problem might already be fixed. Please download a new version from http://pear.php.net/packages.php If you are able to reproduce the bug with one of the latest versions, please change the package version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PEAR. Could you test with the latest version of the package ? require_once 'Spreadsheet/Excel/Writer.php'; $WB =& new Spreadsheet_Excel_Writer(); $sheet1 =& $WB->addWorksheet('Feuille1'); $sheet1->freezePanes(array(6, 0)); $WB->send('test'.date('His').'.xls'); $WB->Close(); Thanks you for advance
 [2011-01-11 02:47 UTC] ecaron (Eric Caron)
 [2011-01-11 02:49 UTC] ecaron (Eric Caron)
I believe this errors comes from having PHP Notices turned on in the _storePanes function. I've attached a patch that checkes if the 3rd and 4th value of $panes is set, and then properly checks rwTop and colLeft later on (so it knows when to use the default values).
 [2012-01-26 09:31 UTC] doconnor (Daniel O'Connor)
Is Bug #17083 a dupe?
 [2018-01-17 15:59 UTC] wardjk (Jeff Ward)
This bug still exists in version 0.9.4. All 4 values must still be provided.