Class StreamingCell

  • All Implemented Interfaces:
    org.apache.poi.ss.usermodel.Cell

    public class StreamingCell
    extends Object
    implements org.apache.poi.ss.usermodel.Cell
    • Constructor Detail

      • StreamingCell

        public StreamingCell​(org.apache.poi.ss.usermodel.Row row,
                             int columnIndex,
                             int rowIndex,
                             boolean use1904Dates)
    • Method Detail

      • setContentSupplier

        public void setContentSupplier​(com.github.pjfanning.xlsx.impl.Supplier contentsSupplier)
      • setRawContents

        public void setRawContents​(Object rawContents)
      • getNumericFormat

        public String getNumericFormat()
      • setNumericFormat

        public void setNumericFormat​(String numericFormat)
      • getNumericFormatIndex

        public Short getNumericFormatIndex()
      • setNumericFormatIndex

        public void setNumericFormatIndex​(Short numericFormatIndex)
      • setFormula

        public void setFormula​(String formula)
      • getType

        public String getType()
      • setType

        public void setType​(String type)
      • isFormulaType

        public boolean isFormulaType()
      • setFormulaType

        public void setFormulaType​(boolean formulaType)
      • setCellStyle

        public void setCellStyle​(org.apache.poi.ss.usermodel.CellStyle cellStyle)
        Specified by:
        setCellStyle in interface org.apache.poi.ss.usermodel.Cell
      • getColumnIndex

        public int getColumnIndex()
        Returns column index of this cell
        Specified by:
        getColumnIndex in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        zero-based column index of a column in a sheet.
      • getRowIndex

        public int getRowIndex()
        Returns row index of a row in the sheet that contains this cell
        Specified by:
        getRowIndex in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        zero-based row index of a row in the sheet that contains this cell
      • getRow

        public org.apache.poi.ss.usermodel.Row getRow()
        Returns the Row this cell belongs to. Note that keeping references to cell rows around after the iterator window has passed will preserve them.
        Specified by:
        getRow in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the Row that owns this cell
      • getSheet

        public org.apache.poi.ss.usermodel.Sheet getSheet()
        Specified by:
        getSheet in interface org.apache.poi.ss.usermodel.Cell
      • getCellType

        public org.apache.poi.ss.usermodel.CellType getCellType()
        Return the cell type.
        Specified by:
        getCellType in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the cell type
      • getCellTypeEnum

        @Deprecated
        public org.apache.poi.ss.usermodel.CellType getCellTypeEnum()
        Deprecated.
        Return the cell type.
        Specified by:
        getCellTypeEnum in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the cell type Will be renamed to getCellType() when we make the CellType enum transition in POI 4.0. See bug 59791.
      • getStringCellValue

        public String getStringCellValue()
        Get the value of the cell as a string. For blank cells we return an empty string.
        Specified by:
        getStringCellValue in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the value of the cell as a string
      • getNumericCellValue

        public double getNumericCellValue()
        Get the value of the cell as a number. For strings we throw an exception. For blank cells we return a 0.
        Specified by:
        getNumericCellValue in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the value of the cell as a number
        Throws:
        NumberFormatException - if the cell value isn't a parsable double.
      • getDateCellValue

        public Date getDateCellValue()
        Get the value of the cell as a date. For strings we throw an exception. For blank cells we return a null.
        Specified by:
        getDateCellValue in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the value of the cell as a date
        Throws:
        IllegalStateException - if the cell type returned by getCellType() is CELL_TYPE_STRING
        NumberFormatException - if the cell value isn't a parsable double.
      • getBooleanCellValue

        public boolean getBooleanCellValue()
        Get the value of the cell as a boolean. For strings we throw an exception. For blank cells we return a false.
        Specified by:
        getBooleanCellValue in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the value of the cell as a date
      • getCellStyle

        public org.apache.poi.ss.usermodel.CellStyle getCellStyle()
        Specified by:
        getCellStyle in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the style of the cell
      • getCellFormula

        public String getCellFormula()
        Return a formula for the cell, for example, SUM(C4:E4)
        Specified by:
        getCellFormula in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        a formula for the cell
        Throws:
        IllegalStateException - if the cell type returned by getCellType() is not CELL_TYPE_FORMULA
      • getRichStringCellValue

        public org.apache.poi.xssf.usermodel.XSSFRichTextString getRichStringCellValue()
        Get the value of the cell as a XSSFRichTextString

        For numeric cells we throw an exception. For blank cells we return an empty string. For formula cells we return the pre-calculated value if a string, otherwise an exception

        Specified by:
        getRichStringCellValue in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        the value of the cell as a XSSFRichTextString
      • getCachedFormulaResultType

        public org.apache.poi.ss.usermodel.CellType getCachedFormulaResultType()
        Only valid for formula cells
        Specified by:
        getCachedFormulaResultType in interface org.apache.poi.ss.usermodel.Cell
        Returns:
        one of (CellType.NUMERIC, CellType.STRING, CellType.BOOLEAN, CellType.ERROR) depending on the cached value of the formula
      • getCachedFormulaResultTypeEnum

        @Deprecated
        public org.apache.poi.ss.usermodel.CellType getCachedFormulaResultTypeEnum()
        Deprecated.
        Specified by:
        getCachedFormulaResultTypeEnum in interface org.apache.poi.ss.usermodel.Cell
      • setCellType

        public void setCellType​(org.apache.poi.ss.usermodel.CellType cellType)
        Not supported
        Specified by:
        setCellType in interface org.apache.poi.ss.usermodel.Cell
      • setBlank

        public void setBlank()
        Not supported
        Specified by:
        setBlank in interface org.apache.poi.ss.usermodel.Cell
      • setCellValue

        public void setCellValue​(double value)
        Not supported
        Specified by:
        setCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setCellValue

        public void setCellValue​(Date value)
        Not supported
        Specified by:
        setCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setCellValue

        public void setCellValue​(Calendar value)
        Not supported
        Specified by:
        setCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setCellValue

        public void setCellValue​(org.apache.poi.ss.usermodel.RichTextString value)
        Not supported
        Specified by:
        setCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setCellValue

        public void setCellValue​(String value)
        Not supported
        Specified by:
        setCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setCellFormula

        public void setCellFormula​(String formula)
                            throws org.apache.poi.ss.formula.FormulaParseException
        Not supported
        Specified by:
        setCellFormula in interface org.apache.poi.ss.usermodel.Cell
        Throws:
        org.apache.poi.ss.formula.FormulaParseException
      • setCellValue

        public void setCellValue​(boolean value)
        Not supported
        Specified by:
        setCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setCellErrorValue

        public void setCellErrorValue​(byte value)
        Not supported
        Specified by:
        setCellErrorValue in interface org.apache.poi.ss.usermodel.Cell
      • getErrorCellValue

        public byte getErrorCellValue()
        Not supported
        Specified by:
        getErrorCellValue in interface org.apache.poi.ss.usermodel.Cell
      • setAsActiveCell

        public void setAsActiveCell()
        Not supported
        Specified by:
        setAsActiveCell in interface org.apache.poi.ss.usermodel.Cell
      • getAddress

        public org.apache.poi.ss.util.CellAddress getAddress()
        Not supported
        Specified by:
        getAddress in interface org.apache.poi.ss.usermodel.Cell
      • setCellComment

        public void setCellComment​(org.apache.poi.ss.usermodel.Comment comment)
        Not supported
        Specified by:
        setCellComment in interface org.apache.poi.ss.usermodel.Cell
      • getCellComment

        public org.apache.poi.ss.usermodel.Comment getCellComment()
        Not supported
        Specified by:
        getCellComment in interface org.apache.poi.ss.usermodel.Cell
      • removeCellComment

        public void removeCellComment()
        Not supported
        Specified by:
        removeCellComment in interface org.apache.poi.ss.usermodel.Cell
      • getHyperlink

        public org.apache.poi.ss.usermodel.Hyperlink getHyperlink()
        Not supported
        Specified by:
        getHyperlink in interface org.apache.poi.ss.usermodel.Cell
      • setHyperlink

        public void setHyperlink​(org.apache.poi.ss.usermodel.Hyperlink link)
        Not supported
        Specified by:
        setHyperlink in interface org.apache.poi.ss.usermodel.Cell
      • removeHyperlink

        public void removeHyperlink()
        Not supported
        Specified by:
        removeHyperlink in interface org.apache.poi.ss.usermodel.Cell
      • getArrayFormulaRange

        public org.apache.poi.ss.util.CellRangeAddress getArrayFormulaRange()
        Not supported
        Specified by:
        getArrayFormulaRange in interface org.apache.poi.ss.usermodel.Cell
      • isPartOfArrayFormulaGroup

        public boolean isPartOfArrayFormulaGroup()
        Not supported
        Specified by:
        isPartOfArrayFormulaGroup in interface org.apache.poi.ss.usermodel.Cell