Package org.apache.poi.ss.usermodel
Class CellValue
- java.lang.Object
-
- org.apache.poi.ss.usermodel.CellValue
-
public final class CellValue extends java.lang.ObjectMimics 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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringformatAsString()booleangetBooleanValue()CellTypegetCellType()Return the cell type.CellTypegetCellTypeEnum()Deprecated.usegetCellTypeinsteadstatic CellValuegetError(int errorCode)bytegetErrorValue()doublegetNumberValue()java.lang.StringgetStringValue()java.lang.StringtoString()static CellValuevalueOf(boolean booleanValue)
-
-
-
Method Detail
-
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 java.lang.String getStringValue()
- Returns:
- Returns the stringValue.
-
getCellTypeEnum
@Deprecated @Removal(version="4.2") public CellType getCellTypeEnum()
Deprecated.usegetCellTypeinsteadReturn 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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
formatAsString
public java.lang.String formatAsString()
-
-