Split Panes in Apache POI and Aspose.Cells

Aspose.Cells - Split Panes

Aspose.Cells provides a class Workbook that represents a Microsoft Excel file. The Workbook class provides a wide range of properties and methods for managing Excel files. To implement split views, use the Worksheet class’s split method. To remove split panes, use the removeSplit method.

Java

//Instantiate a new workbook / Open a template file
Workbook book = new Workbook(dataDir + "workbook.xls");

//Set the active cell
book.getWorksheets().get(0).setActiveCell("A20");

//Split the worksheet window
book.getWorksheets().get(0).split();

Apache POI SS - HSSF & XSSF - Split Panes

Split Panes functionality can be achieved by the createSplitPane method while using the Apache POI SS (HSSF & XSSF) API.

Java

Workbook wb = new XSSFWorkbook();
Sheet sheet = wb.createSheet("new sheet");

// Create a split with the lower left side being the active quadrant
sheet.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT);

Download Running Code

Download Sample Code