Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class CellError

  1. Object
  2. CellError

An error a cell holds instead of a value, such as #DIV/0!. A formula that reads a cell in error answers that error, which is how errors travel through a sheet; nothing is thrown.

There is one instance per error, so two errors can be compared with ==.

Fields

public static final CellError DIV0Division by zero.
public static final CellError NAA value that is not available, what a failed lookup answers.
public static final CellError NAMEA name or a function that is not known.
public static final CellError NULLTwo ranges that were expected to intersect and do not.
public static final CellError NUMA number that is out of the range a function accepts or can answer.
public static final CellError REFA reference to cells that no longer exist.
public static final CellError VALUEA value of the wrong type, such as text where a number is needed.
public static final CellError CIRCULARA formula that depends on its own result.

Methods

public static CellError valueOf(String text)The error for the text a spreadsheet shows, ignoring case.
public int getType()The number the ERROR.TYPE function answers for this error.
public String toString()The text a spreadsheet shows for this error.

Inherited methods

Field details

DIV0

public static final CellError DIV0
Division by zero.

NA

public static final CellError NA
A value that is not available, what a failed lookup answers.

NAME

public static final CellError NAME
A name or a function that is not known.

NULL

public static final CellError NULL
Two ranges that were expected to intersect and do not.

NUM

public static final CellError NUM
A number that is out of the range a function accepts or can answer.

REF

public static final CellError REF
A reference to cells that no longer exist.

VALUE

public static final CellError VALUE
A value of the wrong type, such as text where a number is needed.

CIRCULAR

public static final CellError CIRCULAR
A formula that depends on its own result. Spreadsheet files have no such value: XLSX writes it as #REF!, OpenDocument as LibreOffice’s Err:522, and CSV as #CIRC!.

Method details

valueOf

public static CellError valueOf(String text)
The error for the text a spreadsheet shows, ignoring case.

Parameters

text String
text such as #N/A

Returns

the error, or null when the text is not one

getType

public int getType()
The number the ERROR.TYPE function answers for this error.

Returns

a number from 1 to 7

toString

public String toString()
The text a spreadsheet shows for this error.

Returns

text such as #DIV/0!