# GrapeCity.Documents.Excel.IWorksheet.Evaluate2

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IWorksheet_Evaluate2_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate2*">Evaluate2 Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IWorksheet_Evaluate2_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate2*"></a>
<h4 id="GrapeCity_Documents_Excel_IWorksheet_Evaluate2_System_String_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate2(System.String)">Evaluate2(string)</h4>
<div class="markdown level1 summary"><p>Evaluates the specified Excel formula or named expression and returns the result.
The calculation behavior is consistent with Excel 2021/365.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">object Evaluate2(string formula)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Evaluate2(formula As String) As Object</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">formula</span></td>
      <td><p>A string containing an Excel formula, named range, or defined name to evaluate.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><p>The result of the evaluation in one of these forms:</p>
<ul><li>A single value for a standard formula</li><li>A two-dimensional object array (System.Object[,]) for a dynamic array formula (first dimension: rows, second dimension: columns)</li><li>An IRange object when the formula returns a reference (e.g. "=A1:A5")</li></ul>
</td>
    </tr>
  </tbody>
</table>
</div>
