# GrapeCity.Spreadsheet.PivotTables.IPivotCache.CreatePivotTable

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_PivotTables_IPivotCache_CreatePivotTable_" data-uid="GrapeCity.Spreadsheet.PivotTables.IPivotCache.CreatePivotTable*">CreatePivotTable Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_PivotTables_IPivotCache_CreatePivotTable_" data-uid="GrapeCity.Spreadsheet.PivotTables.IPivotCache.CreatePivotTable*"></a>
<h4 id="GrapeCity_Spreadsheet_PivotTables_IPivotCache_CreatePivotTable_GrapeCity_Spreadsheet_IRange_System_String_" data-uid="GrapeCity.Spreadsheet.PivotTables.IPivotCache.CreatePivotTable(GrapeCity.Spreadsheet.IRange,System.String)">CreatePivotTable(IRange, string)</h4>
<div class="markdown level1 summary"><p>Creates a PivotTable report based on an <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotCache.html">IPivotCache</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">IPivotTable CreatePivotTable(IRange tableDestination, string tableName = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function CreatePivotTable(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.Spreadsheet.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 PivotTable report will be placed). The destination range must be on a worksheet in the workbook that contains the <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotCache.html">IPivotCache</a> object</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.Spreadsheet.PivotTables.IPivotTable.html">IPivotTable</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
