public interface FreeRefFunction
When POI evaluates formulas, each reference argument is capable of evaluating any cell inside its range. Actually, even cells outside the reference range but on the same sheet can be evaluated. This allows OFFSET to be implemented like most other functions - taking only the arguments, and source cell coordinates. For the moment this interface only exists to serve the INDIRECT which can decode arbitrary text into cell references, and evaluate them..
(对于大多数涉及引用 ((cell, area), (2d, 3d)) 的 Excel 函数,引用作为参数传入,并且确切位置保持固定。但是,少数 Excel 函数能够访问不属于作为参数传递的任何引用的一部分的单元格。具有此功能的两个重要函数是 INDIRECT 和 OFFSET 当 POI 评估公式时,每个引用参数都能够评估其范围内的任何单元格。实际上,即使在参考范围之外但在同一张纸上的单元格也可以进行评估。这允许 OFFSET 像大多数其他函数一样实现 - 仅采用参数和源单元格坐标。目前这个接口只存在于服务于可以将任意文本解码为单元格引用并评估它们的 INDIRECT。)Modifier and Type | Method and Description |
---|---|
ValueEval |
evaluate(ValueEval[] args, OperationEvaluationContext ec) |
ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)
args
- the pre-evaluated arguments for this function. args is never
null
, nor are any of its elements.
(args - 此函数的预评估参数。 args 永远不会为空,它的任何元素也不会。)
ec
- primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.
(ec - 主要用于识别包含正在评估的公式的源单元格。也可用于动态创建参考评估。)
null
. Possibly an instance of
ErrorEval in the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).
(从不为空。在指定 Excel 错误的情况下可能是 ErrorEval 的一个实例(从不抛出异常来表示 Excel 错误)。)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.