|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.ss.formula.functions.TextFunction
public abstract class TextFunction
Field Summary | |
---|---|
static Function |
CHAR
Returns the character specified by a number. |
static Function |
CLEAN
An implementation of the CLEAN function: In Excel, the Clean function removes all non-printable characters from a string. |
static Function |
CONCATENATE
|
static Function |
EXACT
|
static Function |
FIND
Implementation of the FIND() function. |
protected static DataFormatter |
formatter
|
static Function |
LEFT
|
static Function |
LEN
|
static Function |
LOWER
|
static Function |
MID
An implementation of the MID function MID returns a specific number of characters from a text string, starting at the specified position. |
static Function |
PROPER
Implementation of the PROPER function: Normalizes all words (separated by non-word characters) by making the first letter upper and the rest lower case. |
static Function |
RIGHT
|
static Function |
SEARCH
Implementation of the FIND() function. |
static Function |
TEXT
An implementation of the TEXT function TEXT returns a number value formatted with the given number formatting string. |
static Function |
TRIM
An implementation of the TRIM function: Removes leading and trailing spaces from value if evaluated operand value is string. |
static Function |
UPPER
|
Constructor Summary | |
---|---|
TextFunction()
|
Method Summary | |
---|---|
ValueEval |
evaluate(ValueEval[] args,
int srcCellRow,
int srcCellCol)
|
protected static double |
evaluateDoubleArg(ValueEval arg,
int srcCellRow,
int srcCellCol)
|
protected abstract ValueEval |
evaluateFunc(ValueEval[] args,
int srcCellRow,
int srcCellCol)
|
protected static int |
evaluateIntArg(ValueEval arg,
int srcCellRow,
int srcCellCol)
|
protected static java.lang.String |
evaluateStringArg(ValueEval eval,
int srcRow,
int srcCol)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final DataFormatter formatter
public static final Function CHAR
public static final Function LEN
public static final Function LOWER
public static final Function UPPER
public static final Function PROPER
public static final Function TRIM
public static final Function CLEAN
public static final Function MID
Syntax:
MID(text, start_num,
num_chars)
Author: Manda Wilson < wilson at c bio dot msk cc dot org >
public static final Function LEFT
public static final Function RIGHT
public static final Function CONCATENATE
public static final Function EXACT
public static final Function TEXT
DataFormatter
to be done, as this works much the same as the
display focused work that that does.
Syntax:
public static final Function FIND
Syntax:
FIND(find_text, within_text, start_num)
FIND returns the character position of the first (case sensitive) occurrence of find_text inside within_text. The third parameter, start_num, is optional (default=1) and specifies where to start searching from. Character positions are 1-based.
Author: Torstein Tauno Svendsen (torstei@officenet.no)
public static final Function SEARCH
Syntax:
SEARCH(find_text, within_text, start_num)
SEARCH is a case-insensitive version of FIND()
Constructor Detail |
---|
public TextFunction()
Method Detail |
---|
protected static java.lang.String evaluateStringArg(ValueEval eval, int srcRow, int srcCol) throws EvaluationException
EvaluationException
protected static int evaluateIntArg(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException
EvaluationException
protected static double evaluateDoubleArg(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException
EvaluationException
public final ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol)
evaluate
in interface Function
args
- the evaluated function arguments. Empty values are represented with
BlankEval
or MissingArgEval
, never null
.srcCellRow
- row index of the cell containing the formula under evaluationsrcCellCol
- column index of the cell containing the formula under evaluation
ErrorEval
, 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
.protected abstract ValueEval evaluateFunc(ValueEval[] args, int srcCellRow, int srcCellCol) throws EvaluationException
EvaluationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |