Set panes and mark them as frozen. One can use this method to mark
certain regions in the worksheet so that they are
"frozen" in the sense that when scrolling through the
worksheet these regions are not affected by the scrolling and
remain where they are on the screen. This is the same
functionality as provided by Microsoft Excel through the
Window+Freeze
Panes menu command.
Parameter
array $panes -
This is the only parameter received and is composed of the following:
0 => Vertical split position,
1 => Horizontal split position
2 => Top row visible
3 => Leftmost column visible
4 => Active pane
$worksheet =& $workbook->addWorksheet("Some Worksheet");
/* ... */
/* This freezes the first six rows of the worksheet: */
$worksheet->freezePanes(array(6, 0));
/* To freeze the first column, one must use the following syntax: */
$worksheet->freezePanes(array(0, 1));
If one needs to further specify the scrolling region, the
following syntax can be used:
/* Freeze the first six rows and start the scrollable region at row nine: */
$worksheet->freezePanes(array(6, 0, 9, 0));