Back to Devexpress

TdxCustomSpreadSheet.EvaluateExpression(string,TdxSpreadSheetTableView) Method

vcl-dxspreadsheetcore-dot-tdxcustomspreadsheet-dot-evaluateexpression-x28-system-dot-string-dxspreadsheetcore-dot-tdxspreadsheettableview-x29.md

latest1.9 KB
Original Source

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

NameType
AExpressionstring
AViewTdxSpreadSheetTableView

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

TdxCustomSpreadSheet Class

TdxCustomSpreadSheet Members

dxSpreadSheetCore Unit