boolean handleRefs) WritableSheet w = new WritableSheetImpl(name, outputFile, formatRecords,
comment.setWidth(features.getCommentWidth()); comment.setHeight(features.getCommentHeight()); sheet.addDrawing(comment); sheet.getWorkbook().addDrawing(comment); features.setCommentDrawing(comment); sheet.getWorkbook(), sheet.getWorkbook(), sheet.getWorkbookSettings()); sheet.addValidationCell(this); if (!features.hasDropDown()) if (sheet.getComboBox() == null) sheet.addDrawing(cb); sheet.getWorkbook().addDrawing(cb); sheet.setComboBox(cb); features.setComboBox(sheet.getComboBox());
wsi.checkMergedBorders(); Range range = wsi.getSettings().getPrintArea(); if (range != null) Range rangeR = wsi.getSettings().getPrintTitlesRow(); Range rangeC = wsi.getSettings().getPrintTitlesCol(); if (rangeR != null && rangeC != null) if (wsheet.getSettings().isSelected()) wsheet.getSettings().setSelected(true); selectedSheetIndex = 0; if ( ( (WritableSheetImpl) sheets.get(i)).isChartOnly()) wsheet.write();
autosizeColumns(); maxRowOutlineLevel, maxColumnOutlineLevel); sheetWriter.setDimensions(getRows(), getColumns()); sheetWriter.setSettings(settings); sheetWriter.setPLS(plsRecord);
row.isCollapsed())) newRow = toSheet.getRowRecord(i); newRow.setRowDetails(row.getRowHeight(), row.matchesDefaultFontHeight(), toSheet.getWorkbook(), toSheet.getWorkbook(), toSheet.getWorkbook().getSettings()); sheetWriter.setCharts(fromSheet.getCharts()); toSheet.getWorkbook().getDrawingGroup()); toDrawings.add(wi); toImages.add(wi);
RowRecord rowrec = getRowRecord(y); // create the row if it doesn't exist for (int x = startColumn; x <= startColumn + extraCols; x++) validation.shareDataValidation(sourceDataValidation); b.setCellFeatures(validation); addCell(b);
/** * Gets all the cells on the specified column * * @param col the column whose cells are to be returned * @return the cells on the specified column */ public Cell[] getColumn(int col) { // Find the last non-null cell boolean found = false; int row = numRows - 1; while (row >= 0 && !found) { if (getCell(col, row).getType() != CellType.EMPTY) { found = true; } else { row--; } } // Only create entries for non-empty cells Cell[] cells = new Cell[row+1]; for (int i = 0; i <= row; i++) { cells[i] = getCell(col, i); } return cells; }
/** * Copies the specified sheet and places it at the index * specified by the parameter * * @param s the index of the sheet to copy * @param name the name of the new sheet * @param index the position of the new sheet */ public void copySheet(int s, String name, int index) { WritableSheet sheet = getSheet(s); WritableSheetImpl ws = (WritableSheetImpl) createSheet(name, index); ws.copy(sheet); }
/** * Merges the specified cells. Any clashes or intersections between * merged cells are resolved when the spreadsheet is written out * * @param col1 the column number of the top left cell * @param row1 the row number of the top left cell * @param col2 the column number of the bottom right cell * @param row2 the row number of the bottom right cell * @return the Range object representing the merged cells * @exception jxl.write..WriteException * @exception jxl.write.biff.RowsExceededException */ public Range mergeCells(int col1, int row1, int col2, int row2) throws WriteException, RowsExceededException { // First check that the cells make sense if (col2 < col1 || row2 < row1) { logger.warn("Cannot merge cells - top left and bottom right "+ "incorrectly specified"); } // Make sure the spreadsheet is up to size if (col2 >= numColumns || row2 >= numRows) { addCell(new Blank(col2, row2)); } SheetRangeImpl range = new SheetRangeImpl(this, col1, row1, col2, row2); mergedCells.add(range); return range; }
/** * Performs the column autosizing */ private void autosizeColumns() { Iterator i = autosizedColumns.iterator(); while (i.hasNext()) { Integer col = (Integer) i.next(); autosizeColumn(col.intValue()); } }
Chart[] charts = getCharts(); for (int c = 0; c < charts.length; c++)
wsi.checkMergedBorders(); Range range = wsi.getSettings().getPrintArea(); if (range != null) Range rangeR = wsi.getSettings().getPrintTitlesRow(); Range rangeC = wsi.getSettings().getPrintTitlesCol(); if (rangeR != null && rangeC != null) if (wsheet.getSettings().isSelected()) wsheet.getSettings().setSelected(true); selectedSheetIndex = 0; if ( ( (WritableSheetImpl) sheets.get(i)).isChartOnly()) wsheet.write();
autosizeColumns(); maxRowOutlineLevel, maxColumnOutlineLevel); sheetWriter.setDimensions(getRows(), getColumns()); sheetWriter.setSettings(settings); sheetWriter.setPLS(plsRecord);
row.isCollapsed())) newRow = toSheet.getRowRecord(i); newRow.setRowDetails(row.getRowHeight(), row.matchesDefaultFontHeight(), toSheet.getWorkbook(), toSheet.getWorkbook(), toSheet.getWorkbook().getSettings()); sheetWriter.setCharts(fromSheet.getCharts()); toSheet.getWorkbook().getDrawingGroup()); toDrawings.add(wi); toImages.add(wi);
RowRecord rowrec = getRowRecord(y); // create the row if it doesn't exist for (int x = startColumn; x <= startColumn + extraCols; x++) validation.shareDataValidation(sourceDataValidation); b.setCellFeatures(validation); addCell(b);