Save This Page
Home » cocoon-2.1.11-src » org.apache.cocoon.poi » hssf » usermodel » [javadoc | source]
org.apache.cocoon.poi.hssf.usermodel
public class: HSSFWorkbook [javadoc | source]
java.lang.Object
   org.apache.cocoon.poi.hssf.usermodel.HSSFWorkbook
High level representation of a workbook. This is the first object most users will construct whether they are reading or writing a workbook. It is also the top level object for creating new sheets/etc.
Field Summary
public static final  int INITIAL_CAPACITY    used for compile-time performance/memory optimization. This determines the initial capacity for the sheet collection. Its currently set to 3. Changing it in this release will decrease performance since you're never allowed to have more or less than three sheets! 
Constructor:
 public HSSFWorkbook() 
 public HSSFWorkbook(Filesystem fs) throws IOException 
    given a POI Filesystem object, read in its Workbook and populate the high and low level models. If you're reading in a workbook...start here.
 public HSSFWorkbook(InputStream s) throws IOException 
    Companion to HSSFWorkbook(Filesystem), this constructs the POI filesystem around your inputstream.
Method from org.apache.cocoon.poi.hssf.usermodel.HSSFWorkbook Summary:
createCellStyle,   createFont,   createSheet,   createSheet,   getBytes,   getCellStyleAt,   getFontAt,   getNumCellStyles,   getNumberOfFonts,   getNumberOfSheets,   getSheet,   getSheetAt,   getSheetIndex,   getSheetName,   removeSheetAt,   setSheetName,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.poi.hssf.usermodel.HSSFWorkbook Detail:
 public HSSFCellStyle createCellStyle() 
    create a new Cell style and add it to the workbook's style table
 public HSSFFont createFont() 
    create a new Font and add it to the workbook's font table
 public HSSFSheet createSheet() 
    create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns the high level representation. Use this to create new sheets.
 public HSSFSheet createSheet(String sheetname) 
    create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns the high level representation. Use this to create new sheets.
 public byte[] getBytes() 
    Method getBytes - get the bytes of just the HSSF portions of the XLS file. Use this to construct a POI Filesystem yourself.
 public HSSFCellStyle getCellStyleAt(short idx) 
    get the cell style object at the given index
 public HSSFFont getFontAt(short idx) 
    get the font at the given index number
 public short getNumCellStyles() 
    get the number of styles the workbook contains
 public short getNumberOfFonts() 
    get the number of fonts in the font table
 public int getNumberOfSheets() 
    get the number of spreadsheets in the workbook (this will be three after serialization)
 public HSSFSheet getSheet(String name) 
    Get sheet with the given name
 public HSSFSheet getSheetAt(int index) 
    Get the HSSFSheet object at the given index.
 public int getSheetIndex(String name) 
    get the sheet's index
 public String getSheetName(int sheet) 
    get the sheet name
 public  void removeSheetAt(int index) 
    removes sheet at the given index
 public  void setSheetName(int sheet,
    String name) 
    set the sheet name.
 public  void write(OutputStream stream) throws IOException 
    Method write - write out this workbook to an Outputstream. Constructs a new POI Filesystem, passes in the workbook binary representation and writes it out.