Class ExcelSaver

  • All Implemented Interfaces:
    ExperimentListener, NotifierListener<Experiment,​Experiment.ExperimentEvent>

    public class ExcelSaver
    extends ResultSaver

    Saves results of an experiment in a handy excel file. The data is stored in a file named like "runResults_2009-08-27_164340.xls". The timestamp in this name is the time the method saveAsExcel() was first called.

    This class stores final results of an experiment as well as results of any sub-experiments.

    This class supports more than 256 columns per sheet (Excel-Limit) by splitting data on multiple sheets.

    Data can be transposed when stored, i.e., rows and columns swapped.

    Author:
    Torsten Hildebrandt, 2009-08-27
    • Constructor Detail

      • ExcelSaver

        public ExcelSaver()
      • ExcelSaver

        public ExcelSaver​(String fileNameHint)
    • Method Detail

      • main

        public static void main​(String[] args)
        This main method can be used to manually convert a .jasResBin file to Excel format.
        Parameters:
        args - The list of command line arguments.
      • readColumns

        protected void readColumns​(ObjectInputStream is)
        Reads column names and values of parameter columns.
        Parameters:
        is - The input file which is read till the end.
      • isTranspose

        public boolean isTranspose()
      • setTranspose

        public void setTranspose​(boolean transpose)
        Change columns/rows.
      • isKeepDataFile

        public boolean isKeepDataFile()
      • setKeepDataFile

        public void setKeepDataFile​(boolean keepDataFile)
        If set, the (binary) result file produced by the parent class ResultSaver is not deleted after successfully creating an Excel file from it (default: false, i.e., the file is deleted).
        Parameters:
        keepDataFile - Whether or not to keep the raw binary file created before conversion to Excel format.
      • getMaxParamValues

        public int getMaxParamValues()
      • setMaxParamValues

        public void setMaxParamValues​(int maxParamValues)
        Sets the maximum number of parameters values shown on sheet "sub-exp. overview". Set this to 0 for no limit (default is: 20).
        Parameters:
        maxParamValues - Sets the maximum number of parameters values shown on overview sheet.
      • getMaxStringLength

        public int getMaxStringLength()
      • setMaxStringLength

        public void setMaxStringLength​(int maxStringLength)
        Sets the maximum length of a String (to save space and increase readability). Set this to 0 for no limit (default is: 500).
        Parameters:
        maxStringLength - The maximum length of a cell value.