# GrapeCity.Documents.Excel.IWorksheet.Evaluate

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IWorksheet_Evaluate_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate*">Evaluate Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IWorksheet_Evaluate_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate*"></a>
<h4 id="GrapeCity_Documents_Excel_IWorksheet_Evaluate_System_String_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate(System.String)">Evaluate(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 2019 and earlier versions.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">object Evaluate(string formula)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Evaluate(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.
When the result of the formula is a reference, such as &quot;=A1&quot;, it will return an IRange object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Excel_IWorksheet_Evaluate_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate*"></a>
<h4 id="GrapeCity_Documents_Excel_IWorksheet_Evaluate_System_String_GrapeCity_Documents_Excel_IFormulaResolver_" data-uid="GrapeCity.Documents.Excel.IWorksheet.Evaluate(System.String,GrapeCity.Documents.Excel.IFormulaResolver)">Evaluate(string, IFormulaResolver)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">object Evaluate(string formula, IFormulaResolver resolver)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Evaluate(formula As String, resolver As IFormulaResolver) 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></td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.IFormulaResolver.html">IFormulaResolver</a></td>
      <td><span class="parametername">resolver</span></td>
      <td></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></td>
    </tr>
  </tbody>
</table>
</div>
