List of usage examples for org.apache.poi.ss.usermodel Sheet createSplitPane
void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane);
From source file:featurescomparison.workingwithcellsrowscolumns.splitpanes.java.ApacheSplitPanes.java
License:Apache License
public static void main(String[] args) throws Exception { String dataPath = "src/featurescomparison/workingwithcellsrowscolumns/splitpanes/data/"; 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); FileOutputStream fileOut = new FileOutputStream(dataPath + "ApacheSplitFreezePanes.xlsx"); wb.write(fileOut);/* ww w .j a va2 s. c o m*/ fileOut.close(); System.out.println("Done."); }
From source file:packtest.SplitAndFreezePanes.java
License:Apache License
public static void main(String[] args) throws Exception { Workbook wb = new XSSFWorkbook(); Sheet sheet1 = wb.createSheet("new sheet"); Sheet sheet2 = wb.createSheet("second sheet"); Sheet sheet3 = wb.createSheet("third sheet"); Sheet 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);/*from w ww.j a v a 2 s . com*/ // Create a split with the lower left side being the active quadrant sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); FileOutputStream fileOut = new FileOutputStream("splitFreezePane.xlsx"); wb.write(fileOut); fileOut.close(); }