/** * Creates a writable workbook. When the workbook is closed, * it will be streamed directly to the output stream. In this * manner, a generated excel spreadsheet can be passed from * a servlet to the browser over HTTP * * @param os the output stream * @param ws the configuration for this workbook * @return the writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os, WorkbookSettings ws) throws IOException { WritableWorkbook w = new WritableWorkbookImpl(os, false, ws); return w; } }
/** * Add new named area to this workbook with the given information. * * @param name name to be created. * @param sheet sheet containing the name * @param firstCol first column this name refers to. * @param firstRow first row this name refers to. * @param lastCol last column this name refers to. * @param lastRow last row this name refers to. */ public void addNameArea(String name, WritableSheet sheet, int firstCol, int firstRow, int lastCol, int lastRow) { addNameArea(name, sheet, firstCol, firstRow, lastCol, lastRow, true); }
/** * 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); }
for (int i = 0; i < getNumberOfSheets(); i++) wsi = (WritableSheetImpl) getSheet(i); addNameArea(BuiltInName.PRINT_AREA, wsi, range.getTopLeft().getColumn(), addNameArea(BuiltInName.PRINT_TITLES, wsi, rangeR.getTopLeft().getColumn(), addNameArea(BuiltInName.PRINT_TITLES, wsi, rangeR.getTopLeft().getColumn(), addNameArea(BuiltInName.PRINT_TITLES, wsi, rangeC.getTopLeft().getColumn(), rationalize(); TabIdRecord tabid = new TabIdRecord(getNumberOfSheets()); outputFile.write(tabid); WritableSheetImpl wsheet = null; int selectedSheetIndex = 0; for (int i = 0 ; i < getNumberOfSheets() && !sheetSelected ; i++)
toSheet.getWorkbook().getDrawingGroup() == null) toSheet.getWorkbook().createDrawingGroup(); dr[i].getWidth(), dr[i].getHeight(), dr[i].getImageData()); toSheet.getWorkbook().addDrawing(wi); drawings.add(wi); images.add(wi); toSheet.getWorkbook().getDrawingGroup(), workbookSettings); drawings.add(c); new jxl.biff.drawing.Button (dr[i], toSheet.getWorkbook().getDrawingGroup(), workbookSettings); drawings.add(b); new jxl.biff.drawing.ComboBox (dr[i], toSheet.getWorkbook().getDrawingGroup(), workbookSettings); drawings.add(cb);
toSheet.getWorkbook(), toSheet.getWorkbook(), toSheet.getWorkbook().getSettings()); toSheet.getWorkbook().getDrawingGroup()); toDrawings.add(wi); toImages.add(wi);
/** * Creates a new sheet within the workbook, at the specified position. * The new sheet is inserted at the specified position, or prepended/appended * to the list of sheets if the index specified is somehow inappropriate * * @param name the name of the new sheet * @param index the index at which to add the sheet * @return the created sheet */ public WritableSheet createSheet(String name, int index) { return createSheet(name, index, true); }
/** * Overrides the method in the base class to add this to the Workbook's * list of maintained formulas * * @param fr the formatting records * @param ss the shared strings used within the workbook * @param s the sheet this is being added to */ void setCellDetails(FormattingRecords fr, SharedStrings ss, WritableSheetImpl s) { super.setCellDetails(fr, ss, s); s.getWorkbook().addRCIRCell(this); }
if (workbook.getDrawingGroup() != null) dmod |= workbook.getDrawingGroup().hasDrawingsOmitted();
workbook.addDrawing(image); drawings.add(image); images.add(image);
workbook.columnInserted(this, col);
workbook.columnRemoved(this, col);
for (int i = 0; i < getNumberOfSheets(); i++) wsi = (WritableSheetImpl) getSheet(i); addNameArea(BuiltInName.PRINT_AREA, wsi, range.getTopLeft().getColumn(), addNameArea(BuiltInName.PRINT_TITLES, wsi, rangeR.getTopLeft().getColumn(), addNameArea(BuiltInName.PRINT_TITLES, wsi, rangeR.getTopLeft().getColumn(), addNameArea(BuiltInName.PRINT_TITLES, wsi, rangeC.getTopLeft().getColumn(), rationalize(); TabIdRecord tabid = new TabIdRecord(getNumberOfSheets()); outputFile.write(tabid); WritableSheetImpl wsheet = null; int selectedSheetIndex = 0; for (int i = 0 ; i < getNumberOfSheets() && !sheetSelected ; i++)
toSheet.getWorkbook().getDrawingGroup() == null) toSheet.getWorkbook().createDrawingGroup(); dr[i].getWidth(), dr[i].getHeight(), dr[i].getImageData()); toSheet.getWorkbook().addDrawing(wi); drawings.add(wi); images.add(wi); toSheet.getWorkbook().getDrawingGroup(), workbookSettings); drawings.add(c); new jxl.biff.drawing.Button (dr[i], toSheet.getWorkbook().getDrawingGroup(), workbookSettings); drawings.add(b); new jxl.biff.drawing.ComboBox (dr[i], toSheet.getWorkbook().getDrawingGroup(), workbookSettings); drawings.add(cb);
toSheet.getWorkbook(), toSheet.getWorkbook(), toSheet.getWorkbook().getSettings()); toSheet.getWorkbook().getDrawingGroup()); toDrawings.add(wi); toImages.add(wi);
/** * Creates a new sheet within the workbook, at the specified position. * The new sheet is inserted at the specified position, or prepended/appended * to the list of sheets if the index specified is somehow inappropriate * * @param name the name of the new sheet * @param index the index at which to add the sheet * @return the created sheet */ public WritableSheet createSheet(String name, int index) { return createSheet(name, index, true); }
/** * Overrides the method in the base class to add this to the Workbook's * list of maintained formulas * * @param fr the formatting records * @param ss the shared strings used within the workbook * @param s the sheet this is being added to */ void setCellDetails(FormattingRecords fr, SharedStrings ss, WritableSheetImpl s) { super.setCellDetails(fr, ss, s); s.getWorkbook().addRCIRCell(this); }
if (workbook.getDrawingGroup() != null) dmod |= workbook.getDrawingGroup().hasDrawingsOmitted();
workbook.addDrawing(image); drawings.add(image); images.add(image);