# GrapeCity.Documents.Excel.IPivotFilters.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IPivotFilters_Add_" data-uid="GrapeCity.Documents.Excel.IPivotFilters.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IPivotFilters_Add_" data-uid="GrapeCity.Documents.Excel.IPivotFilters.Add*"></a>
<h4 id="GrapeCity_Documents_Excel_IPivotFilters_Add_GrapeCity_Documents_Excel_PivotFilterType_System_Object_System_Object_GrapeCity_Documents_Excel_PivotFilterOptions_" data-uid="GrapeCity.Documents.Excel.IPivotFilters.Add(GrapeCity.Documents.Excel.PivotFilterType,System.Object,System.Object,GrapeCity.Documents.Excel.PivotFilterOptions)">Add(PivotFilterType, object, object, PivotFilterOptions)</h4>
<div class="markdown level1 summary"><p>Adds a new filter to the PivotFilters collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">IPivotFilter Add(PivotFilterType type, object value1 = null, object value2 = null, PivotFilterOptions options = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Add(type As PivotFilterType, Optional value1 As Object = Nothing, Optional value2 As Object = Nothing, Optional options As PivotFilterOptions = Nothing) As IPivotFilter</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="GrapeCity.Documents.Excel.PivotFilterType.html">PivotFilterType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>The type of filter.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value1</span></td>
      <td><p>The first value for the filter (optional).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value2</span></td>
      <td><p>The second value for the filter (optional).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.PivotFilterOptions.html">PivotFilterOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>Additional settings for the filter (optional).</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="GrapeCity.Documents.Excel.IPivotFilter.html">IPivotFilter</a></td>
      <td><p>The added pivot filter.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
