# GrapeCity.Documents.Excel.IPivotTables.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IPivotTables_Add_" data-uid="GrapeCity.Documents.Excel.IPivotTables.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IPivotTables_Add_" data-uid="GrapeCity.Documents.Excel.IPivotTables.Add*"></a>
<h4 id="GrapeCity_Documents_Excel_IPivotTables_Add_GrapeCity_Documents_Excel_IPivotCache_GrapeCity_Documents_Excel_IRange_System_String_" data-uid="GrapeCity.Documents.Excel.IPivotTables.Add(GrapeCity.Documents.Excel.IPivotCache,GrapeCity.Documents.Excel.IRange,System.String)">Add(IPivotCache, IRange, string)</h4>
<div class="markdown level1 summary"><p>Adds a new PivotTable report.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">IPivotTable Add(IPivotCache PivotCache, IRange TableDestination, string TableName = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Add(PivotCache As IPivotCache, TableDestination As IRange, Optional TableName As String = Nothing) As IPivotTable</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.IPivotCache.html">IPivotCache</a></td>
      <td><span class="parametername">PivotCache</span></td>
      <td><p>The PivotTable cache on which the new PivotTable report is based. The cache provides data for the report.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.IRange.html">IRange</a></td>
      <td><span class="parametername">TableDestination</span></td>
      <td><p>The cell in the upper-left corner of the PivotTable report's destination range (the range on the
worksheet where the resulting report will be placed). You must specify a destination range on the worksheet that contains the PivotTables
object specified by expression.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">TableName</span></td>
      <td><p>The name of the new PivotTable report.</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.IPivotTable.html">IPivotTable</a></td>
      <td><p>PivotTable object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
