Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.ss.usermodel
Class CellValue

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

    public final class CellValue

extends java.lang.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 Summary
`static CellValue` | `FALSE`
`static CellValue` | `TRUE`

Constructor Summary
`CellValue(double numberValue)`
`CellValue(java.lang.String stringValue)`

Method Summary
`java.lang.String` | `formatAsString()`
`boolean` | `getBooleanValue()`
`int` | `getCellType()` Deprecated. POI 3.15. Use `getCellTypeEnum()` instead.
`CellType` | `getCellTypeEnum()` Return the cell type.
`static CellValue` | `getError(int errorCode)`
`byte` | `getErrorValue()`
`double` | `getNumberValue()`
`java.lang.String` | `getStringValue()`
`java.lang.String` | `toString()`
`static CellValue` | `valueOf(boolean booleanValue)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TRUE

    public static final CellValue TRUE

### FALSE

    public static final CellValue FALSE

Constructor Detail

### CellValue

    public CellValue(double numberValue)

### CellValue

    public CellValue(java.lang.String stringValue)

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

    @Removal(version="4.2")
    public CellType getCellTypeEnum()

  Return the cell type.

  Returns:
    the cell type
  Since:
    POI 3.15 Will be renamed to `getCellTypeEnum()` when we make the CellType enum transition in POI 4.0. See bug 59791.

### getCellType

    @Deprecated
    public int getCellType()

  Deprecated. POI 3.15. Use `getCellTypeEnum()` instead.

  Return the cell type. Will return `CellType` in version 4.0 of POI. For forwards compatibility, do not hard-code cell type literals in your code.

  Returns:
    the cell type

### getErrorValue

    public byte getErrorValue()

  Returns:
    Returns the errorValue.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### formatAsString

    public java.lang.String formatAsString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.