EvaluateExpressionOptions
Type Parameters
Section titled “Type Parameters”Values
Section titled “Values”Values extends boolean = boolean
Single
Section titled “Single”Single extends boolean = boolean
Fallback
Section titled “Fallback”Fallback = unknown
Properties
Section titled “Properties”cropTo?
Section titled “cropTo?”optional cropTo?: "any-cell-information" | "cells-with-non-blank-values";How to size the returned area when single is false.
-
'any-cell-information'(the default): return the full populated rectangle, keeping cells that carry any data --- values, formulas, or style-only metadata. -
'cells-with-non-blank-values': trim trailing rows and columns whose cells are all blank-valued. Cells with no value, empty-string values, or#N/Aerrors all count as blank; a blank cell in a merged region (Cell.Mset) is still treated as data and prevents that column or row from being trimmed.
definedName?
Section titled “definedName?”optional definedName?: Values extends false ? Single extends true ? boolean : never : never;True if a single cell is to be returned, and it should be a defined-name
cell if that defined name evaluates to a cell value or array (i.e. not a
reference). If this is true, then values is ignored and assumed false,
and single is ignored and assumed true.
extraContext?
Section titled “extraContext?”optional extraContext?: | Partial<EvaluationContext> | null;Extra context to pass to Model.runFormula(), which is then passed through to the formula runner.
fallBack
Section titled “fallBack”fallBack: Fallback;Value to return if expression is null or empty or =, or if
options.single is true and the expression does not resolve to a single
cell/value.
single
Section titled “single”single: Single;True if a single cell or value is to be returned; false for a 2-D array of cells or values.
values
Section titled “values”values: Values;True if bare values are to be returned, false for Cell objects.