| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final Pattern | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ValueEval | Returns: whatever the selected cell's evaluated value is. Nevernull. Never
ErrorEval.Implements (some perhaps not well known) Excel functionality to select a single cell from an area depending on the coordinates of the calling cell. |
| private static ValueEval | Returns: possiblyErrorEval, and null
|
| private static ValueEval | |
| public static Boolean | |
| public static double | Returns: actual, parsed or interpreted double value (respectively).Applies some conversion rules if the supplied value is not already a number. |
| public static int | coerceValueToInt(ValueEval ev)
Applies some conversion rules if the supplied value is not already an integer. |
| public static String | Returns: the converted string value. nevernullmust be a ve)NumberEval, StringEval, BoolEval, or BlankEval
|
| public static ValueEval | Returns: aNumberEval, StringEval, BoolEval or BlankEval. or ErrorEval
Never null.area reference after evaluation ae, EvaluationCell the source cell of the formula that contains its 2D indices cell)Retrieves a single value from an area evaluation utilizing the 2D indices of the cell within its own area reference to index the value in the area evaluation. |
| public static ValueEval | Returns: aNumberEval, StringEval, BoolEval or BlankEval.
Never null or ErrorEval.the evaluated argument as passed to the function or operator. arg, int used when arg is a single column AreaRef srcCellRow, int used when arg is a single row AreaRef srcCellCol)Retrieves a single value from a variety of different argument types according to standard Excel rules. |
| public static Double | |
| public static Double | Returns: null if the specified text cannot be parsed as a numberConverts a string to a double using standard rules that Excel would use. |
| Digits | back to summary |
|---|---|
| private static final String Digits | |
| Exp | back to summary |
|---|---|
| private static final String Exp | |
| fpPattern | back to summary |
|---|---|
| private static final Pattern fpPattern | |
| fpRegex | back to summary |
|---|---|
| private static final String fpRegex | |
| OperandResolver | back to summary |
|---|---|
| private OperandResolver() | |
| chooseSingleElementFromArea | back to summary | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static ValueEval chooseSingleElementFromArea(AreaEval ae, int srcCellRow, int srcCellCol) throws EvaluationException Implements (some perhaps not well known) Excel functionality to select a single cell from an area depending on the coordinates of the calling cell. Here is an example demonstrating both selection from a single row area and a single column area in the same formula.
The same concept is extended to references across sheets, such that even multi-row, multi-column areas can be useful.
Of course with carefully (or carelessly) chosen parameters, cyclic references can occur and
hence this method can throw a 'circular reference' EvaluationException. Note that
this method does not attempt to detect cycles. Every cell in the specified Area
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| chooseSingleElementFromAreaInternal | back to summary |
|---|---|
private static ValueEval chooseSingleElementFromAreaInternal(AreaEval ae, int srcCellRow, int srcCellCol) throws EvaluationException
| |
| chooseSingleElementFromRef | back to summary |
|---|---|
| private static ValueEval chooseSingleElementFromRef(RefEval ref) | |
| coerceValueToBoolean | back to summary |
|---|---|
public static Boolean coerceValueToBoolean(ValueEval ve, boolean stringsAreBlanks) throws EvaluationException
| |
| coerceValueToDouble | back to summary |
|---|---|
| public static double coerceValueToDouble(ValueEval ev) throws EvaluationException Applies some conversion rules if the supplied value is not already a number.
Note -
| |
| coerceValueToInt | back to summary |
|---|---|
| public static int coerceValueToInt(ValueEval ev) throws EvaluationException Applies some conversion rules if the supplied value is not already an integer.
Excel typically converts doubles to integers by truncating toward negative infinity. | |
| coerceValueToString | back to summary |
|---|---|
| public static String coerceValueToString(ValueEval ve) | |
| getElementFromArray | back to summary |
|---|---|
| public static ValueEval getElementFromArray(AreaEval ae, EvaluationCell cell) Retrieves a single value from an area evaluation utilizing the 2D indices of the cell within its own area reference to index the value in the area evaluation.
| |
| getSingleValue | back to summary |
|---|---|
| public static ValueEval getSingleValue(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException Retrieves a single value from a variety of different argument types according to standard Excel rules. Does not perform any type conversion.
| |
| parseDateTime | back to summary |
|---|---|
| public static Double parseDateTime(String pText) | |
| parseDouble | back to summary |
|---|---|
| public static Double parseDouble(String pText) Converts a string to a double using standard rules that Excel would use.
Doesn't support currency prefixes, commas, percentage signs or arithmetic operations strings.
Some examples:
| |