/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. * @param leftmostColumn Left column visible in right pane. * @param topRow Top row visible in bottom pane */ @Override public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) { _sh.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. */ @Override public void createFreezePane(int colSplit, int rowSplit) { _sh.createFreezePane(colSplit,rowSplit); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizontal position of split. * @param rowSplit Vertical position of split. */ @Override public void createFreezePane(int colSplit, int rowSplit) { createFreezePane( colSplit, rowSplit, colSplit, rowSplit ); }
protected void nextSheet(String sheetName, int colSplit, int rowSplit, boolean view) { currentSheet = workbook.createSheet(sheetName); currentDrawing = currentSheet.createDrawingPatriarch(); currentSheet.createFreezePane(colSplit, rowSplit); currentRowNumber = -1; headerCellCount = 0; if (view) { currentSheet.setTabColor(VIEW_TAB_COLOR); } }
/** * Creates a split pane. Any existing freezepane or split pane is overwritten. * @param xSplitPos Horizontal position of split (in 1/20th of a point). * @param ySplitPos Vertical position of split (in 1/20th of a point). * @param topRow Top row visible in bottom pane * @param leftmostColumn Left column visible in right pane. * @param activePane Active pane. One of: PANE_LOWER_RIGHT, * PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_LOWER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_LOWER_RIGHT * @see org.apache.poi.ss.usermodel.Sheet#PANE_UPPER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_UPPER_RIGHT */ @Override public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) { createFreezePane(xSplitPos, ySplitPos, leftmostColumn, topRow); if (xSplitPos > 0 || ySplitPos > 0) { final CTPane pane = getPane(true); pane.setState(STPaneState.SPLIT); pane.setActivePane(STPane.Enum.forInt(activePane)); } }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. * @param leftmostColumn Left column visible in right pane. * @param topRow Top row visible in bottom pane */ @Override public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) { _sh.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. */ @Override public void createFreezePane(int colSplit, int rowSplit) { _sh.createFreezePane(colSplit,rowSplit); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. * @param leftmostColumn Left column visible in right pane. * @param topRow Top row visible in bottom pane */ public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) { _sh.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. */ public void createFreezePane(int colSplit, int rowSplit) { _sh.createFreezePane(colSplit,rowSplit); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizontal position of split. * @param rowSplit Vertical position of split. */ @Override public void createFreezePane(int colSplit, int rowSplit) { createFreezePane( colSplit, rowSplit, colSplit, rowSplit ); }
/** * Creates a split (freezepane). Any existing freezepane or split pane is overwritten. * @param colSplit Horizonatal position of split. * @param rowSplit Vertical position of split. */ public void createFreezePane(int colSplit, int rowSplit) { createFreezePane( colSplit, rowSplit, colSplit, rowSplit ); }
protected void nextSheet(String sheetName, int colSplit, int rowSplit, boolean view) { currentSheet = workbook.createSheet(sheetName); currentDrawing = currentSheet.createDrawingPatriarch(); currentSheet.createFreezePane(colSplit, rowSplit); currentRowNumber = -1; headerCellCount = 0; if (view) { currentSheet.setTabColor(VIEW_TAB_COLOR); } }
/** * Creates a split pane. Any existing freezepane or split pane is overwritten. * @param xSplitPos Horizontal position of split (in 1/20th of a point). * @param ySplitPos Vertical position of split (in 1/20th of a point). * @param topRow Top row visible in bottom pane * @param leftmostColumn Left column visible in right pane. * @param activePane Active pane. One of: PANE_LOWER_RIGHT, * PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_LOWER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_LOWER_RIGHT * @see org.apache.poi.ss.usermodel.Sheet#PANE_UPPER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_UPPER_RIGHT */ @Override public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) { createFreezePane(xSplitPos, ySplitPos, leftmostColumn, topRow); if (xSplitPos > 0 || ySplitPos > 0) { final CTPane pane = getPane(true); pane.setState(STPaneState.SPLIT); pane.setActivePane(STPane.Enum.forInt(activePane)); } }
/** * Creates a split pane. Any existing freezepane or split pane is overwritten. * @param xSplitPos Horizonatal position of split (in 1/20th of a point). * @param ySplitPos Vertical position of split (in 1/20th of a point). * @param topRow Top row visible in bottom pane * @param leftmostColumn Left column visible in right pane. * @param activePane Active pane. One of: PANE_LOWER_RIGHT, * PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_LOWER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_LOWER_RIGHT * @see org.apache.poi.ss.usermodel.Sheet#PANE_UPPER_LEFT * @see org.apache.poi.ss.usermodel.Sheet#PANE_UPPER_RIGHT */ public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) { createFreezePane(xSplitPos, ySplitPos, leftmostColumn, topRow); getPane().setState(STPaneState.SPLIT); getPane().setActivePane(STPane.Enum.forInt(activePane)); }
createExcelData(workbook, tableSheet); tableSheet.createFreezePane(0, 1); tableSheet.setAutoFilter(new CellRangeAddress(0, tableSheet.getLastRowNum(), 0, table.getColumnCount() - 1));
@Override public void createExcelFromTable(File file, List<E> components) throws Exception { componentTableModel.setComponents(components); XSSFWorkbook workbook = new XSSFWorkbook(); // Feuille XSSFSheet tableSheet = workbook.createSheet(SwingMessages.getString("TableFileWriter.11")); createExcelHeader(workbook, tableSheet); createExcelData(workbook, tableSheet, components); tableSheet.createFreezePane(0, 1); tableSheet.setAutoFilter(new CellRangeAddress(0, tableSheet.getLastRowNum(), 0, table.getColumnCount() - 1)); for (int i = 0; i < table.getColumnCount(); i++) { // tableSheet.autoSizeColumn(i); tableSheet.setColumnWidth(i, 20 * 256); } FileOutputStream out = null; try { out = new FileOutputStream(file); workbook.write(out); } catch (IOException e) { throw e; } finally { if (out != null) { out.close(); } } }
tableSheet.setColumnWidth(i, columnMap.get(i) * 50); tableSheet.createFreezePane(titleSize, headerSize, titleSize, headerSize);