[]
Evaluates the specified Excel formula or named expression and returns the result.
The formula is evaluated by using dynamic array semantics.
object Evaluate2(string formula)
Function Evaluate2(formula As String) As Object
| Type | Name | Description |
|---|---|---|
| string | formula | A string containing an Excel formula, named range, or defined name to evaluate. A leading |
| Type | Description |
|---|---|
| object | The evaluated result. |
worksheet.Range["A1"].Value = 1;
worksheet.Range["A2"].Value = 2;
worksheet.Range["A3"].Value = 2;
object result = worksheet.Evaluate2("=UNIQUE(A1:A3)");
| Type | Condition |
|---|---|
| InvalidFormulaException | if |