Class HSSFReadWrite


  • public final class HSSFReadWrite
    extends Object
    File for HSSF testing/examples THIS IS NOT THE MAIN HSSF FILE!! This is a utility for testing functionality. It does contain sample API usage that may be educational to regular API users.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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 testCreateSampleSheet(String).
      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.
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws Exception
        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 testCreateSampleSheet(String).
        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.
        Throws:
        Exception