public final class Value extends Fixed1ArgFunction implements ArrayFunction
Syntax:
VALUE(text)
Converts the text argument to a number. Leading and/or trailing whitespace is ignored. Currency symbols and thousands separators are stripped out. Scientific notation is also supported. If the supplied text does not convert properly the result is #VALUE! error. Blank string converts to zero.
| Constructor and Description |
|---|
Value() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Double |
convertTextToNumber(java.lang.String strText)
TODO see if the same functionality is needed in
OperandResolver.parseDouble(String) |
ValueEval |
evaluate(int srcRowIndex,
int srcColumnIndex,
ValueEval arg0)
|
ValueEval |
evaluateArray(ValueEval[] args,
int srcRowIndex,
int srcColumnIndex) |
static java.lang.Double |
parseDateTime(java.lang.String pText) |
evaluateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait_evaluateOneArrayArg, _evaluateTwoArrayArgs, evaluateOneArrayArg, evaluateTwoArrayArgspublic ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0)
Function1Argevaluate in interface Function1Argpublic ValueEval evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex)
evaluateArray in interface ArrayFunctionargs - the evaluated function arguments. Empty values are represented with
BlankEval or MissingArgEval, never null.srcRowIndex - row index of the cell containing the formula under evaluationsrcColumnIndex - column index of the cell containing the formula under evaluationErrorEval, never null.
Note - Excel uses the error code #NUM! instead of IEEE NaN, so when
numeric functions evaluate to Double.NaN be sure to translate the result to ErrorEval.NUM_ERROR.public static java.lang.Double convertTextToNumber(java.lang.String strText)
OperandResolver.parseDouble(String)null if there is any problem converting the textpublic static java.lang.Double parseDateTime(java.lang.String pText)
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.