NativeExcel suite v1.x

Calculate method

Calculates the result of specified expression.

Syntax

function Calculate(Expression: WideString):Variant;
ExpressionWideString. A string that specifies an expression which should be calculated.

Example

This example calculates the simple expression.
Val := Workbook.Calculate('100/2*3');
This example determines the smallest value in a range A1:F10 on active worksheet.
Val := Workbook.Calculate('MIN(A1:F10)');
This example is the same to previous.
Val := Workbook.ActiveSheet.Calculate('MIN(A1:F10)');
Copyright © NikaSoft 2004-2010