# GrapeCity.Spreadsheet.ITableRows.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_ITableRows_Add_" data-uid="GrapeCity.Spreadsheet.ITableRows.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_ITableRows_Add_" data-uid="GrapeCity.Spreadsheet.ITableRows.Add*"></a>
<h4 id="GrapeCity_Spreadsheet_ITableRows_Add_System_Int32_System_Boolean_System_Int32_" data-uid="GrapeCity.Spreadsheet.ITableRows.Add(System.Int32,System.Boolean,System.Int32)">Add(int, bool, int)</h4>
<div class="markdown level1 summary"><p>Adds a new row to the table object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">ITableRow Add(int position = -1, bool alwaysInsert = true, int count = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Add(Optional position As Integer = -1, Optional alwaysInsert As Boolean = True, Optional count As Integer = 1) As ITableRow</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">position</span></td>
      <td><p>An integer value indicates the relative position of the new row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">alwaysInsert</span></td>
      <td><p>A boolean value indicates  whether to always shift data in cells below the last row of the table when the new row is inserted,
regardless if the row below the table is empty. If True , the cells below the table will be shifted down one row.
If False , if the row below the table is empty, the table will expand to occupy that row without shifting cells below it;
but if the row below the table contains data, those cells will be shifted down when the new row is inserted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>The total number of new rows.</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.ITableRow.html">ITableRow</a></td>
      <td><p>An <a class="xref" href="GrapeCity.Spreadsheet.ITableRow.html">ITableRow</a> object that represents the new row.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_ITableRows_Add_System_Int32_System_Boolean_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If <code class="paramref">position</code> is not specified, a new bottom row is added.
If <code class="paramref">alwaysInsert</code> is not specified, the cells below the table will be shifted down one row (same as specifying <code>true</code>).</p>
</div>
</div>
