Top Description Inners Fields Constructors Methods
org.apache.poi.ss.formula.eval

public final Class FunctionEval

extends Object
Class Inheritance
Imports
java.util.Collection, .Collections, .TreeSet, org.apache.poi.ss.formula.atp.AnalysisToolPak, org.apache.poi.ss.formula.function.FunctionMetadata, .FunctionMetadataRegistry, org.apache.poi.ss.formula.functions.*

Mappings from the Excel functions to our evaluation implementations (where available)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
FunctionEval.FunctionID

Some function IDs that require special treatment

Field Summary

Modifier and TypeField and Description
protected static final Function[]
functions

Array elements corresponding to unimplemented functions are null

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Function

Returns:

null if the specified functionIndex is for INDIRECT() or any external (add-in) function.
getBasicFunction
(int functionIndex)

public static Collection<String>

Returns:

an array of not supported functions
getNotSupportedFunctionNames
()

Returns an array of function names NOT implemented by POI.

public static Collection<String>

Returns:

an array of supported functions
getSupportedFunctionNames
()

Returns a collection of function names implemented by POI.

private static Function[]
public static void
registerFunction(String
the function name
name
,
Function
the function to register
func
)

Register a new function in runtime.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

functionsback to summary
protected static final Function[] functions

Array elements corresponding to unimplemented functions are null

Constructor Detail

FunctionEvalback to summary
private FunctionEval()

Method Detail

getBasicFunctionback to summary
public static Function getBasicFunction(int functionIndex)
Returns:Function

null if the specified functionIndex is for INDIRECT() or any external (add-in) function.

getNotSupportedFunctionNamesback to summary
public static Collection<String> getNotSupportedFunctionNames()

Returns an array of function names NOT implemented by POI.

Returns:Collection<String>

an array of not supported functions

Since
3.8 beta6
getSupportedFunctionNamesback to summary
public static Collection<String> getSupportedFunctionNames()

Returns a collection of function names implemented by POI.

Returns:Collection<String>

an array of supported functions

Since
3.8 beta6
produceFunctionsback to summary
private static Function[] produceFunctions()

See Apache Open Office Excel File Format, Section 3.11 Built-In Sheet Functions

registerFunctionback to summary
public static void registerFunction(String name, Function func)

Register a new function in runtime.

Parameters
name:String

the function name

func:Function

the function to register

Exceptions
IllegalArgumentException:
if the function is unknown or already registered.
Since
3.8 beta6
org.apache.poi.ss.formula.eval back to summary

private final Class FunctionEval.FunctionID

extends Object
Class Inheritance

Some function IDs that require special treatment

Field Summary

Modifier and TypeField and Description
public static final int
CHOOSE

100

public static final int
public static final int
IF

1

public static final int
public static final int
public static final int
SUM

4

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHOOSEback to summary
public static final int CHOOSE

100

EXTERNAL_FUNCback to summary
public static final int EXTERNAL_FUNC

255

IFback to summary
public static final int IF

1

INDIRECTback to summary
public static final int INDIRECT

148

OFFSETback to summary
public static final int OFFSET

78

SUMback to summary
public static final int SUM

4

Constructor Detail

FunctionIDback to summary
private FunctionID()