CTPane pane = getPane();
if (colSplit > 0) pane.setXSplit(colSplit);
if (rowSplit > 0) pane.setYSplit(rowSplit);
pane.setState(STPaneState.FROZEN);
if (rowSplit == 0) {
pane.setTopLeftCell(new CellReference(0, topRow).formatAsString());
pane.setActivePane(STPane.TOP_RIGHT);
} else if (colSplit == 0) {
pane.setTopLeftCell(new CellReference(rowSplit, 0).formatAsString());
pane.setActivePane(STPane.BOTTOM_LEFT);
} else {
pane.setTopLeftCell(new CellReference(leftmostColumn, topRow).formatAsString());
pane.setActivePane(STPane.BOTTOM_RIGHT);
}
CTSheetView ctView = getDefaultSheetView();
ctView.setSelectionArray(null);