Home » JCraft » jxl » write » biff » [javadoc | source]
jxl.write.biff
public class: WritableWorkbookImpl [javadoc | source]
java.lang.Object
   jxl.write.WritableWorkbook
      jxl.write.biff.WritableWorkbookImpl

All Implemented Interfaces:
    WorkbookMethods, ExternalSheet

A writable workbook
Fields inherited from jxl.write.WritableWorkbook:
ARIAL_10_PT,  HYPERLINK_FONT,  NORMAL_STYLE,  HYPERLINK_STYLE,  HIDDEN_STYLE
Constructor:
 public WritableWorkbookImpl(OutputStream os,
    boolean cs,
    WorkbookSettings ws) throws IOException 
    Constructor. Writes the workbook direct to the existing output stream
    Parameters:
    os - the output stream
    cs - TRUE if the workbook should close the output stream, FALSE
    ws - the configuration for this workbook otherwise
    Throws:
    IOException -
    exception: IOException -
 public WritableWorkbookImpl(OutputStream os,
    Workbook w,
    boolean cs,
    WorkbookSettings ws) throws IOException 
    A pseudo copy constructor. Takes the handles to the font and formatting records
    Parameters:
    w - the workbook to copy
    os - the output stream to write the data to
    cs - TRUE if the workbook should close the output stream, FALSE
    ws - the configuration for this workbook
    Throws:
    IOException -
    exception: IOException -
Method from jxl.write.biff.WritableWorkbookImpl Summary:
addDrawing,   addNameArea,   addNameArea,   addNameArea,   addNameArea,   addRCIRCell,   close,   columnInserted,   columnRemoved,   copySheet,   copySheet,   createDrawingGroup,   createSheet,   findByName,   findCellByName,   getColourRGB,   getDrawingGroup,   getExternalSheetIndex,   getExternalSheetIndex,   getExternalSheetName,   getLastExternalSheetIndex,   getLastExternalSheetIndex,   getLastExternalSheetName,   getName,   getNameIndex,   getNumberOfSheets,   getRangeNames,   getReadSheet,   getSettings,   getSheet,   getSheet,   getSheetNames,   getSheets,   getStyles,   getWorkbookBof,   getWritableCell,   importSheet,   moveSheet,   removeDrawing,   removeRangeName,   removeSheet,   rowInserted,   rowRemoved,   setColourRGB,   setOutputFile,   setProtected,   write
Methods from jxl.write.WritableWorkbook:
addNameArea,   close,   copy,   copySheet,   copySheet,   createSheet,   findByName,   findCellByName,   getNumberOfSheets,   getRangeNames,   getSheet,   getSheet,   getSheetNames,   getSheets,   getWritableCell,   importSheet,   moveSheet,   removeRangeName,   removeSheet,   setColourRGB,   setOutputFile,   setProtected,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from jxl.write.biff.WritableWorkbookImpl Detail:
  void addDrawing(DrawingGroupObject d) 
    Adds a drawing to this workbook
 public  void addNameArea(String name,
    WritableSheet sheet,
    int firstCol,
    int firstRow,
    int lastCol,
    int lastRow) 
    Add new named area to this workbook with the given information.
  void addNameArea(String name,
    WritableSheet sheet,
    int firstCol,
    int firstRow,
    int lastCol,
    int lastRow,
    boolean global) 
    Add new named area to this workbook with the given information.
  void addNameArea(BuiltInName name,
    WritableSheet sheet,
    int firstCol,
    int firstRow,
    int lastCol,
    int lastRow,
    boolean global) 
    Add new named area to this workbook with the given information.
  void addNameArea(BuiltInName name,
    WritableSheet sheet,
    int firstCol,
    int firstRow,
    int lastCol,
    int lastRow,
    int firstCol2,
    int firstRow2,
    int lastCol2,
    int lastRow2,
    boolean global) 
    Add new named area to this workbook with the given information.
  void addRCIRCell(CellValue cv) 
    Adds a cell to workbook wide range of cells which need adjustment following a row/column insert or remove
 public  void close() throws IOException, JxlWriteException 
    Closes this workbook, and frees makes any memory allocated available for garbage collection
  void columnInserted(WritableSheetImpl s,
    int col) 
    Called when a column is inserted on the specified sheet. Notifies all RCIR cells of this change
  void columnRemoved(WritableSheetImpl s,
    int col) 
    Called when a column is removed on the specified sheet. Notifies all RCIR cells of this change
 public  void copySheet(int s,
    String name,
    int index) 
    Copies the specified sheet and places it at the index specified by the parameter
 public  void copySheet(String s,
    String name,
    int index) 
    Copies the specified sheet and places it at the index specified by the parameter
 DrawingGroup createDrawingGroup() 
    Create a drawing group for this workbook - used when importing sheets which contain drawings, but this workbook doesn't. We can't subsume this into the getDrawingGroup() method because the null-ness of the return value is used elsewhere to determine the origin of the workbook
 public WritableSheet createSheet(String name,
    int index) 
    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
 public Range[] findByName(String name) 
    Gets the named range from this workbook. The Range object returns contains all the cells from the top left to the bottom right of the range. If the named range comprises an adjacent range, the Range[] will contain one object; for non-adjacent ranges, it is necessary to return an array of length greater than one. If the named range contains a single cell, the top left and bottom right cell will be the same cell
 public WritableCell findCellByName(String name) 
    Gets the named cell from this workbook. If the name refers to a range of cells, then the cell on the top left is returned. If the name cannot be found, null is returned
 public RGB getColourRGB(Colour c) 
    Accessor for the RGB value for the specified colour
 DrawingGroup getDrawingGroup() 
    Accessor for the drawing group
 public int getExternalSheetIndex(int index) 
    Gets the index of the external sheet for the name
 public int getExternalSheetIndex(String sheetName) 
    Gets the external sheet index for the sheet name
 public String getExternalSheetName(int index) 
    Gets the name of the external sheet specified by the index
 public int getLastExternalSheetIndex(int index) 
    Gets the index of the external sheet for the name
 public int getLastExternalSheetIndex(String sheetName) 
    Gets the last external sheet index for the sheet name
 public String getLastExternalSheetName(int index) 
    Gets the name of the last external sheet specified by the index
 public String getName(int index) 
    Gets the name at the specified index
 public int getNameIndex(String name) 
    Gets the index of the name record for the name
 public int getNumberOfSheets() 
    Returns the number of sheets in this workbook
 public String[] getRangeNames() 
    Gets the named ranges
 public Sheet getReadSheet(int index) 
    Interface method from WorkbookMethods - gets the specified sheet within this workbook
 WorkbookSettings getSettings() 
    Accessor for the workbook settings
 public WritableSheet getSheet(int index) 
    Gets the specified sheet within this workbook
 public WritableSheet getSheet(String name) 
    Gets the sheet with the specified name from within this workbook
 public String[] getSheetNames() 
    Gets the sheet names
 public WritableSheet[] getSheets() 
    Gets the sheets within this workbook. Use of this method for large worksheets can cause performance problems.
 Styles getStyles() 
    Accessor for the jxl.common.styles
 public BOFRecord getWorkbookBof() 
    Parsing of formulas is only supported for a subset of the available biff version, so we need to test to see if this version is acceptable
 public WritableCell getWritableCell(String loc) 
    Returns the cell for the specified location eg. "Sheet1!A4". This is identical to using the CellReferenceHelper with its associated performance overheads, consequently it should be use sparingly
 public WritableSheet importSheet(String name,
    int index,
    Sheet sheet) 
    Imports a sheet from a different workbook. Does a deep copy on all elements within that sheet
 public WritableSheet moveSheet(int fromIndex,
    int toIndex) 
    Moves the specified sheet within this workbook to another index position.
  void removeDrawing(Drawing d) 
    Removes a drawing from this workbook
 public  void removeRangeName(String name) 
    Removes the specified named range from the workbook
 public  void removeSheet(int index) 
    Removes a sheet from this workbook, the other sheets indices being altered accordingly. If the sheet referenced by the index does not exist, then no action is taken.
  void rowInserted(WritableSheetImpl s,
    int row) 
    Called when a row is inserted on the specified sheet. Notifies all RCIR cells of this change
  void rowRemoved(WritableSheetImpl s,
    int row) 
    Called when a row is removed on the specified sheet. Notifies all RCIR cells of this change
 public  void setColourRGB(Colour c,
    int r,
    int g,
    int b) 
    Sets the RGB value for the specified colour for this workbook
 public  void setOutputFile(File fileName) throws IOException 
    Sets a new output file. This allows the smae workbook to be written to various different output files without having to read in any templates again
 public  void setProtected(boolean prot) 
    Indicates whether or not this workbook is protected
 public  void write() throws IOException 
    Writes out this sheet to the output file. First it writes out the standard workbook information required by excel, before calling the write method on each sheet individually