As i went through apache poi documentation, they say you can get information of freeze or split pane using PanelInformation object in util package. And for that i need object of HSSFSheet class. I am able to get HSSFSHeet object but when I am trying to get PanelInformation from it using getPanelInformation method. It returns me null.
HSSFWorkbook workbook = new HSSFWorkbook(file); HSSFSheet sheet = workbook.getSheetAt(sheetNumber); workbook.setActiveSheet(sheetNumber); System.out.println(sheet.getPaneInformation());
See the documentation here:
The method you are looking for I believe is the method getPaneInformation() which will tell you if the pane you are currently looking at is a freeze or split pane.
null is normal behavior for the
null if no pane configured, or the pane information.
This indicates that neither a split pane nor a freeze pane has been set up for your
Sheet. If you did create a split pane or a freeze pane, either in the workbook you’re reading, or programmatically with
getPaneInformation would return a non-
This question is quite old, so I put this information for the sake of sharing Knowledge.
As written previously, you can find out if some rows are frozen with:
Then, you can get the first index of the non-frozen row with:
According to the Javadoc:
For a horizontal split returns the top row in the BOTTOM pane.
In case of vertical split, one has to use: