# GrapeCity.Documents.Excel.ISlicers.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_ISlicers_Add_" data-uid="GrapeCity.Documents.Excel.ISlicers.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_ISlicers_Add_" data-uid="GrapeCity.Documents.Excel.ISlicers.Add*"></a>
<h4 id="GrapeCity_Documents_Excel_ISlicers_Add_GrapeCity_Documents_Excel_IWorksheet_System_String_System_String_System_Double_System_Double_System_Double_System_Double_" data-uid="GrapeCity.Documents.Excel.ISlicers.Add(GrapeCity.Documents.Excel.IWorksheet,System.String,System.String,System.Double,System.Double,System.Double,System.Double)">Add(IWorksheet, string, string, double, double, double, double)</h4>
<div class="markdown level1 summary"><p>Creates a new slicer and returns a <a class="xref" href="GrapeCity.Documents.Excel.ISlicer.html">ISlicer</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">ISlicer Add(IWorksheet slicerDestination, string name, string caption, double top, double left, double width, double height)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Add(slicerDestination As IWorksheet, name As String, caption As String, top As Double, left As Double, width As Double, height As Double) As ISlicer</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.IWorksheet.html">IWorksheet</a></td>
      <td><span class="parametername">slicerDestination</span></td>
      <td><p>a <a class="xref" href="GrapeCity.Documents.Excel.IWorksheet.html">IWorksheet</a> object that represents the sheet, where the resulting slicer will be placed.The destination sheet must be in the workbook that contains the <a class="xref" href="GrapeCity.Documents.Excel.ISlicers.html">ISlicers</a> 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">name</span></td>
      <td><p>The name of the slicer.The name must be unique across all slicers within a workbook.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">caption</span></td>
      <td><p>The caption of the slicer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">top</span></td>
      <td><p>The initial vertical position of the slicer, in points, relative to the upper-left corner of cell A1 on a worksheet.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">left</span></td>
      <td><p>The initial horizontal position of the slicer, in points, relative to the upper-left corner of cell A1 on a worksheet.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The initial width, in points, of the slicer control.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The initial height, in points, of the slicer control.</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.ISlicer.html">ISlicer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
