Skip to main content

TdxCustomSpreadSheet.EvaluateExpression(string,TdxSpreadSheetTableView) Method

Attempts to parse and calculate the specified formula expression string.

Declaration

function EvaluateExpression(const AExpression: string; AView: TdxSpreadSheetTableView = nil): Variant;

Parameters

Name Type
AExpression string
AView TdxSpreadSheetTableView

Returns

Type
Variant

Remarks

Call this function and pass a formula expression string as the AExpression parameter to evaluate it without the need to modify a spreadsheet document’s content.

Use the AView optional parameter to specify the worksheet used as a source for cell references in the evaluated expression. The EvaluateExpression function uses the active worksheet as the base reference source if the parameter is omitted.

The EvaluateExpression function returns the Null Variant value if an attempt to parse and calculate the specified formula expression results in an error; otherwise – returns the calculated expression value.

Note

An EvaluateExpression function call does not add a new parsed formula expression to the formula controller.

See Also