Interface SpreadSheetReader

    • Method Detail

      • getFormatDescription

        String getFormatDescription()
        Returns a string describing the format (used in the file chooser).
        Specified by:
        getFormatDescription in interface FileFormatHandler
        Returns:
        a description suitable for displaying in the file chooser
      • getCorrespondingWriter

        SpreadSheetWriter getCorrespondingWriter()
        Returns, if available, the corresponding writer.
        Returns:
        the writer, null if none available
      • setDataRowType

        void setDataRowType​(DataRow value)
        Sets the type of data row to use.
        Parameters:
        value - the type
      • getDataRowType

        DataRow getDataRowType()
        Returns the type of data row to use.
        Returns:
        the type
      • dataRowTypeTipText

        String dataRowTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSpreadSheetType

        void setSpreadSheetType​(SpreadSheet value)
        Sets the type of spreadsheet to use.
        Parameters:
        value - the type
      • getSpreadSheetType

        SpreadSheet getSpreadSheetType()
        Returns the type of spreadsheet to use.
        Returns:
        the type
      • spreadSheetTypeTipText

        String spreadSheetTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • read

        SpreadSheet read​(File file)
        Reads the spreadsheet from the specified file.
        Parameters:
        file - the file to read from
        Returns:
        null in case of an error, otherwise the spreadsheet
      • read

        SpreadSheet read​(String filename)
        Reads the spreadsheet from the given file.
        Parameters:
        filename - the file to read from
        Returns:
        the spreadsheet or null in case of an error
      • read

        SpreadSheet read​(InputStream stream)
        Reads the spreadsheet from the stream. The caller must ensure to close the stream.
        Parameters:
        stream - the stream to read from
        Returns:
        the spreadsheet or null in case of an error
      • read

        SpreadSheet read​(Reader r)
        Reads the spreadsheet from the given reader. The caller must ensure to close the reader.
        Parameters:
        r - the reader to read from
        Returns:
        the spreadsheet or null in case of an error
      • stopExecution

        void stopExecution()
        Stops the reading (might not be immediate, depending on reader).
        Specified by:
        stopExecution in interface Stoppable
      • isStopped

        boolean isStopped()
        Returns whether the reading was stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        Returns:
        true if stopped
      • hasLastError

        boolean hasLastError()
        Returns whether an error was encountered during the last read.
        Specified by:
        hasLastError in interface ErrorProvider
        Returns:
        true if an error occurred
      • getLastError

        String getLastError()
        Returns the error that occurred during the last read.
        Specified by:
        getLastError in interface ErrorProvider
        Returns:
        the error string, null if none occurred