# GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.Group

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_Group_" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.Group*">Group Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_Group_" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.Group*"></a>
<h4 id="GrapeCity_Spreadsheet_Commands_PivotTables_PivotTableCommand_Group_GrapeCity_Spreadsheet_IRange_System_Nullable_System_Double__System_Nullable_System_Double__System_Nullable_System_Double__GrapeCity_Spreadsheet_PivotTables_PivotGroupPeriods___" data-uid="GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.Group(GrapeCity.Spreadsheet.IRange,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},GrapeCity.Spreadsheet.PivotTables.PivotGroupPeriods[])">Group(IRange, double?, double?, double?, PivotGroupPeriods[])</h4>
<div class="markdown level1 summary"><p>Initializes a new command to group specified range inside <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.IPivotTable.html">IPivotTable</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Command Group(IRange range, double? start, double? end, double? interval, PivotGroupPeriods[] periods)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Group(range As IRange, start As Double?, [end] As Double?, interval As Double?, periods As PivotGroupPeriods()) As Command</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">range</span></td>
      <td><p>The specfied <a class="xref" href="GrapeCity.Spreadsheet.IRange.html">IRange</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?</td>
      <td><span class="parametername">start</span></td>
      <td><p>The first value to be grouped</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?</td>
      <td><span class="parametername">end</span></td>
      <td><p>The last value to be grouped</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>?</td>
      <td><span class="parametername">interval</span></td>
      <td><p>If the field is numeric, this argument specifies the size of each group. If the field is a date, this argument specifies the number of days.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.PivotTables.PivotGroupPeriods.html">PivotGroupPeriods</a>[]</td>
      <td><span class="parametername">periods</span></td>
      <td><p>An array of <a class="xref" href="GrapeCity.Spreadsheet.PivotTables.PivotGroupPeriods.html">PivotGroupPeriods</a> that specify the period for the date group.</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.Commands.Command.html">Command</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.Commands.Command.html">Command</a> to process group.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
