DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8739>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8739 ability to freeze rows and columns in HSSF Summary: ability to freeze rows and columns in HSSF Product: POI Version: 1.5.1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: HSSF AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Enhancement request: Ability to freeze rows and/or columns in HSSF so that they do not scroll when displayed in Excel. My user base really needs this functionality. My experience with this feature comes from using the perl module Spreadsheet::WriteExcel which does allow freezing. The code to do this in the Spreadsheet::WriteExcel module is: my $workbook = Spreadsheet::WriteExcel->new($out_file); my $worksheet = $workbook->addworksheet("Primers"); # freeze the header row $worksheet->freeze_panes(1, 0); Here is a snippet from the Spreadsheet::WriteExcel man page, if it is of use to you when designing the API for it: freeze_panes($row, $col, $top_row, $left_col) This method can be used to divide a worksheet into horizontal or verti� cal regions known as panes and to also "freeze" these panes so that the splitter bars are not visible. This is the same as the `Window->Freeze Panes' menu command in Excel The parameters `$row' and `$col' are used to specify the location of the split. It should be noted that the split is specified at the top or left of a cell and that the method uses zero based indexing. Therefore to freeze the first row of a worksheet it is necessary to specify the split at row 2 (which is 1 as the zero-based index). This might lead you to think that you are using a 1 based index but this is not the case. You can set one of the `$row' and `$col' parameters as zero if you do not want either a vertical or horizontal split. Examples: $worksheet->freeze_panes(1, 0); # Freeze the first row $worksheet->freeze_panes('A2'); # Same using A1 notation $worksheet->freeze_panes(0, 1); # Freeze the first column $worksheet->freeze_panes('B1'); # Same using A1 notation $worksheet->freeze_panes(1, 2); # Freeze first row and first 2 cols $worksheet->freeze_panes('C2'); # Same using A1 notation The parameters `$top_row' and `$left_col' are optional. They are used to specify the top-most or left-most visible row or column in the scrolling region of the panes. For example to freeze the first row and to have the scrolling region begin at row twenty: $worksheet->freeze_panes(1, 0, 20, 0);
