Class CellValue

java.lang.Object
org.apache.poi.ss.usermodel.CellValue

public final class CellValue extends Object
Mimics the 'data view' of a cell. This allows formula evaluator to return a CellValue instead of precasting the value to String or Number or boolean type.
  • Field Details

  • Constructor Details

    • CellValue

      public CellValue(double numberValue)
    • CellValue

      public CellValue(String stringValue)
  • Method Details

    • valueOf

      public static CellValue valueOf(boolean booleanValue)
    • getError

      public static CellValue getError(int errorCode)
    • getBooleanValue

      public boolean getBooleanValue()
      Returns:
      Returns the booleanValue.
    • getNumberValue

      public double getNumberValue()
      Returns:
      Returns the numberValue.
    • getStringValue

      public String getStringValue()
      Returns:
      Returns the stringValue.
    • getCellTypeEnum

      @Deprecated @Removal(version="4.2") public CellType getCellTypeEnum()
      Deprecated.
      use getCellType instead
      Return the cell type.
      Returns:
      the cell type
      Since:
      POI 3.15
    • getCellType

      public CellType getCellType()
      Return the cell type.
      Returns:
      the cell type
    • getErrorValue

      public byte getErrorValue()
      Returns:
      Returns the errorValue.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • formatAsString

      public String formatAsString()