Class: CellValue

CellValue

Class responsible for wrapping formula expression. It contains calculated value of
the formula, an error if it has happened and cell references which indicates a relationship with regular
cells. This object uses physical cell coordinates.

Members

staticCellValue.STATE_COMPUTING

Computing state indicates cells under processing.

staticCellValue.STATE_OUT_OFF_DATE

Out of date state indicates cells ready for recomputing.

staticCellValue.STATE_UP_TO_DATE

Up to date state indicates cells with fresh computed value.

errorString null

Error name.

precedentsArray

List of precedents cells.

stateString

Indicates cell state.

value*

Computed value.

Methods

addPrecedent(cellReference)

Add precedent cell to the collection.

Parameters:
Name Type Description
cellReference CellReference

Cell reference object.

clearPrecedents()

Clear all precedent cells.

getError(){String|null}

Get error name for this cell.

Returns: {String|null}

getPrecedents(){Array}

Get precedent cells.

Returns: {Array}

getValue(){*}

Get computed value.

Returns: {*}

hasError(){Boolean}

Check if cell value is marked as error.

Returns: {Boolean}

hasPrecedent(cellReference){Boolean}

Check if cell reference is precedents this cell.

Parameters:
Name Type Description
cellReference CellReference

Cell reference object.

Returns: {Boolean}

hasPrecedents(){Boolean}

Check if cell value has precedents cells.

Returns: {Boolean}

isState(){Boolean}

Check cell state.

Returns: {Boolean}

removePrecedent(cellReference)

Remove precedent cell from the collection.

Parameters:
Name Type Description
cellReference CellReference

Cell reference object.

setError(error)

Set error message for this cell.

Parameters:
Name Type Description
error String

Error name.

setState(state)

Set cell state.

Parameters:
Name Type Description
state Number

Cell state.

setValue(value)

Set computed value.

Parameters:
Name Type Description
value *