Class ExcelSpreadSheetWriter

    • Field Detail

      • FILE_EXTENSION

        public static String FILE_EXTENSION
        the binary file extension.
      • FILE_EXTENSION_OOXML

        public static String FILE_EXTENSION_OOXML
        the OOXML file extension.
      • m_WriteOOXML

        protected boolean m_WriteOOXML
        whether to write OOXML instead of binary Excel files (latter is default).
      • m_TimeFormat

        protected DateFormatString m_TimeFormat
        the format string for the times.
      • m_DateFormat

        protected DateFormatString m_DateFormat
        the format string for the dates.
      • m_DateTimeFormat

        protected DateFormatString m_DateTimeFormat
        the format string for the date/times.
      • m_OutputAsDisplayed

        protected boolean m_OutputAsDisplayed
        whether to output the cells as displayed (disable to output formulas).
    • Constructor Detail

      • ExcelSpreadSheetWriter

        public ExcelSpreadSheetWriter()
    • Method Detail

      • setWriteOOXML

        public void setWriteOOXML​(boolean value)
        Sets whether to use OOXML instead of binary Excel files.
        Parameters:
        value - if true OOXML files are generated
      • getWriteOOXML

        public boolean getWriteOOXML()
        Returns whether OOXML files are generated instead of binary Excel files.
        Returns:
        true if OOXML files are generated
      • setTimeFormat

        public void setTimeFormat​(DateFormatString value)
        Sets the format for time columns.
        Parameters:
        value - the format
      • getTimeFormat

        public DateFormatString getTimeFormat()
        Returns the format for time columns.
        Returns:
        the format
      • timeFormatTipText

        public String timeFormatTipText()
        Returns the tip time for this property.
        Returns:
        tip time for this property suitable for displaying in the gui
      • setDateFormat

        public void setDateFormat​(DateFormatString value)
        Sets the format for date columns.
        Parameters:
        value - the format
      • getDateFormat

        public DateFormatString getDateFormat()
        Returns the format for date columns.
        Returns:
        the format
      • dateFormatTipText

        public String dateFormatTipText()
        Returns the tip date for this property.
        Returns:
        tip date for this property suitable for displaying in the gui
      • setDateTimeFormat

        public void setDateTimeFormat​(DateFormatString value)
        Sets the format for date/time columns.
        Parameters:
        value - the format
      • getDateTimeFormat

        public DateFormatString getDateTimeFormat()
        Returns the format for date/time columns.
        Returns:
        the format
      • dateTimeFormatTipText

        public String dateTimeFormatTipText()
        Returns the tip date/time for this property.
        Returns:
        tip date for this property suitable for displaying in the gui
      • setOutputAsDisplayed

        public void setOutputAsDisplayed​(boolean value)
        Sets whether to output the cell content as displayed, ie, no formulas but the result of formulas.
        Specified by:
        setOutputAsDisplayed in interface SpreadSheetWriterWithFormulaSupport
        Parameters:
        value - true if to output as displayed
      • getOutputAsDisplayed

        public boolean getOutputAsDisplayed()
        Returns whether to output the cell content as displayed, ie, no formulas but the result of formulas.
        Specified by:
        getOutputAsDisplayed in interface SpreadSheetWriterWithFormulaSupport
        Returns:
        true if to output as displayed
      • doWrite

        protected boolean doWrite​(SpreadSheet[] content,
                                  OutputStream out)
        Performs the actual writing. The caller must ensure that the writer gets closed.
        Overrides:
        doWrite in class AbstractMultiSheetSpreadSheetWriter
        Parameters:
        content - the spreadsheet to write
        out - the writer to write the spreadsheet to
        Returns:
        true if successfully written