Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomSpreadSheet.EvaluateExpression(string,TdxSpreadSheetTableView) Method

Attempts to parse and calculate the specified formula expression string.

#Declaration

Delphi
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