List of usage examples for org.apache.poi.hssf.usermodel HSSFSheet createSplitPane
@Override public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane)
From source file:poi.hssf.usermodel.examples.SplitAndFreezePanes.java
License:Apache License
public static void main(String[] args) throws IOException { HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet1 = wb.createSheet("new sheet"); HSSFSheet sheet2 = wb.createSheet("second sheet"); HSSFSheet sheet3 = wb.createSheet("third sheet"); HSSFSheet sheet4 = wb.createSheet("fourth sheet"); // Freeze just one row sheet1.createFreezePane(0, 1, 0, 1); // Freeze just one column sheet2.createFreezePane(1, 0, 1, 0); // Freeze the columns and rows (forget about scrolling position of the lower right quadrant). sheet3.createFreezePane(2, 2);//w w w. ja va2 s.c o m // Create a split with the lower left side being the active quadrant sheet4.createSplitPane(2000, 2000, 0, 0, HSSFSheet.PANE_LOWER_LEFT); FileOutputStream fileOut = new FileOutputStream("workbook.xls"); wb.write(fileOut); fileOut.close(); }