Top Description Fields Constructors Methods
org.apache.poi.ss.formula.atp

pack-priv final Class NetworkdaysFunction

extends Object
implements FreeRefFunction
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.functions.FreeRefFunction
Imports
org.apache.poi.ss.formula.OperationEvaluationContext, org.apache.poi.ss.formula.eval.ErrorEval, .EvaluationException, .NumberEval, .ValueEval, org.apache.poi.ss.formula.functions.FreeRefFunction

Implementation of Excel 'Analysis ToolPak' function NETWORKDAYS()
Returns the number of workdays given a starting and an ending date, considering an interval of holidays. A workday is any non saturday/sunday date.

Syntax
NETWORKDAYS(startDate, endDate, holidays)

Field Summary

Modifier and TypeField and Description
private ArgumentsEvaluator
public static final FreeRefFunction

Constructor Summary

AccessConstructor and Description
private
NetworkdaysFunction(ArgumentsEvaluator
an injected ArgumentsEvaluator.
anEvaluator
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public ValueEval

Returns:

ValueEval for the number of days between two dates.
evaluate
(ValueEval[]
the pre-evaluated arguments for this function. args is never null, nor are any of its elements.
args
,
OperationEvaluationContext
primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.
ec
)

Implements org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

Evaluate for NETWORKDAYS.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

evaluatorback to summary
private ArgumentsEvaluator evaluator
instanceback to summary
public static final FreeRefFunction instance

Constructor Detail

NetworkdaysFunctionback to summary
private NetworkdaysFunction(ArgumentsEvaluator anEvaluator)

Constructor.

Parameters
anEvaluator:ArgumentsEvaluator

an injected ArgumentsEvaluator.

Method Detail

evaluateback to summary
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)

Implements org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

Evaluate for NETWORKDAYS. Given two dates and an optional date or interval of holidays, determines how many working days are there between those dates.

Parameters
args:ValueEval[]

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

the pre-evaluated arguments for this function. args is never null, nor are any of its elements.

ec:OperationEvaluationContext

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.

Returns:ValueEval

ValueEval for the number of days between two dates.