Package loci.poi.hssf.dev
Class HSSF
java.lang.Object
loci.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.
- Author:
- Andrew Oliver (acoliver at apache dot org)
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor HSSF - creates an HSSFStream from an InputStream.Constructor HSSF - given a filename this outputs a sample sheet with just a set of rows/cells.Constructor HSSF - takes in file - attempts to read it then reconstruct it -
Method Summary
Modifier and TypeMethodDescriptionstatic voidMethod 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)).
-
Field Details
-
hssfworkbook
-
-
Constructor Details
-
HSSF
Constructor HSSF - creates an HSSFStream from an InputStream. The HSSFStream reads in the records allowing modification.- Parameters:
filename-- Throws:
IOException
-
HSSF
Constructor HSSF - given a filename this outputs a sample sheet with just a set of rows/cells.- Parameters:
filename-write-- Throws:
IOException
-
HSSF
Constructor HSSF - takes in file - attempts to read it then reconstruct it- Parameters:
infile-outfile-write-- Throws:
IOException
-
-
Method Details
-
main
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-
-