Save This Page
Home » poi-src-3.2-FINAL-20081019 » org.apache » poi » hssf » dev » [javadoc | source]
org.apache.poi.hssf.dev
public class: HSSF [javadoc | source]
java.lang.Object
   org.apache.poi.hssf.dev.HSSF
File for HSSF testing/examples THIS IS NOT THE MAIN HSSF FILE!! This is a util for testing functionality. It does contain sample API usage that may be educational to regular API users.
Field Summary
protected  HSSFWorkbook hssfworkbook     
Constructor:
 public HSSF(String filename) throws IOException 
    Constructor HSSF - creates an HSSFStream from an InputStream. The HSSFStream reads in the records allowing modification.
    Parameters:
    filename -
    Throws:
    IOException -
    exception: IOException -
 public HSSF(String filename,
    boolean write) throws IOException 
    Constructor HSSF - given a filename this outputs a sample sheet with just a set of rows/cells.
    Parameters:
    filename -
    write -
    Throws:
    IOException -
    exception: IOException -
 public HSSF(String infile,
    String outfile,
    boolean write) throws IOException 
    Constructor HSSF - takes in file - attempts to read it then reconstruct it
    Parameters:
    infile -
    outfile -
    write -
    Throws:
    IOException -
    exception: IOException -
Method from org.apache.poi.hssf.dev.HSSF Summary:
main
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.poi.hssf.dev.HSSF Detail:
 public static  void main(String[] args) 
    Method main Given 1 argument takes that as the filename, inputs it and dumps the cell values/types out to sys.out given 2 arguments where the second argument is the word "write" and the first is the filename - writes out a sample (test) spreadsheet (see public HSSF(String filename, boolean write)). given 2 arguments where the first is an input filename and the second an output filename (not write), attempts to fully read in the spreadsheet and fully write it out. given 3 arguments where the first is an input filename and the second an output filename (not write) and the third is "modify1", attempts to read in the spreadsheet, deletes rows 0-24, 74-99. Changes cell at row 39, col 3 to "MODIFIED CELL" then writes it out. Hence this is "modify test 1". If you take the output from the write test, you'll have a valid scenario.