Bug #1754 [Com]: The freezePanes() function does not work properly
| From: | nivalduh | Date: | Thu, 17 Sep 2009 13:50:30 +0000 |
| Subject: | Bug #1754 [Com]: The freezePanes() function does not work properly | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1663@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=1754&edit=1
ID: 1754
Comment by: nivalduh
Reported By: nivalduh at gmail dot com
Summary: The freezePanes() function does not work properly
Status: Bogus
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Windows XP
PHP Version: 4.3.0
New Comment:
Hi guys,
I've been through the same problem, then I realized what I did wrong.
Here goes an example and explanation:
$worksheet->freezePanes(array(5, 1, 5, 1));
Note that in this case the array has four positions starting from 0 to
3 where:
0 => Vertical split position (it means how much rows you do want to
freeze)
1 => Horizontal split position (it means how much columns you do want
to freeze)
2 => Top row visible (it means the first row to be displayed after
frozen panes)
3 => Leftmost column visible (it means the first column to be displayed
after frozen panes)
Now realize that the first row and column to be displayed after frozen
panes should be a number equal or greater than the number of rows or
columns you do want to freeze.
That solved my problem, I hope it helps somebody too.
Previous Comments:
------------------------------------------------------------------------
[2004-07-16 20:30:07] xnoguer at php dot net
Thank you for taking the time to write to us, but this is not
a bug.
Depending on the arguments given, lines can appear twice in the
"border" between panes. Check your arguments.
------------------------------------------------------------------------
[2004-06-30 12:23:59] amarmain at bug-tracker dot com
Description:
------------
When using freezePanes() function, the line is freezed correctly but
appeared twice in Excel (just after the Excel document loading).
Reproduce code:
---------------
I change the freezePanes() code:
function freezePanes($panes)
{
$this->_frozen = 1;
$this->_panes = $panes;
}
Expected result:
----------------
With the following one:
function freezePanes()
{
$_=func_get_args();
# Check for a cell reference in A1 notation and substitute row and
column
if (preg_match('/^\D/', $_[0]))
{$_ = $this->_substitute_cellref($_);}
$this->_frozen = 1;
$this->_panes = $_;
}
Actual result:
--------------
The fucntion works correctly and the line is not displayed twice.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=1754&edit=1