org.apache.poi.hssf.dev
Class HSSF

java.lang.Object
  |
  +--org.apache.poi.hssf.dev.HSSF

public class HSSF
extends java.lang.Object

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.

Author:
Andrew Oliver (acoliver at apache dot org)
See Also:
main(java.lang.String[])

Field Summary
protected  HSSFWorkbook hssfworkbook
           
 
Constructor Summary
HSSF(java.lang.String filename)
          Constructor HSSF - creates an HSSFStream from an InputStream.
HSSF(java.lang.String filename, boolean write)
          Constructor HSSF - given a filename this outputs a sample sheet with just a set of rows/cells.
HSSF(java.lang.String infile, java.lang.String outfile, boolean write)
          Constructor HSSF - takes in file - attempts to read it then reconstruct it
 
Method Summary
static void main(java.lang.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)).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hssfworkbook

protected HSSFWorkbook hssfworkbook
Constructor Detail

HSSF

public HSSF(java.lang.String filename)
     throws java.io.IOException
Constructor HSSF - creates an HSSFStream from an InputStream. The HSSFStream reads in the records allowing modification.
Parameters:
filename -  
Throws:
java.io.IOException -  

HSSF

public HSSF(java.lang.String filename,
            boolean write)
     throws java.io.IOException
Constructor HSSF - given a filename this outputs a sample sheet with just a set of rows/cells.
Parameters:
filename -  
write -  
Throws:
java.io.IOException -  

HSSF

public HSSF(java.lang.String infile,
            java.lang.String outfile,
            boolean write)
     throws java.io.IOException
Constructor HSSF - takes in file - attempts to read it then reconstruct it
Parameters:
infile -  
outfile -  
write -  
Throws:
java.io.IOException -  
Method Detail

main

public static void main(java.lang.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.
Parameters:
args -  


Copyright © 2002 Apache jakarta-poi project. All Rights Reserved.