# GrapeCity.Documents.Drawing.TableRenderer.AddCell

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*">AddCell Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*"></a>
<h4 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell(System.Int32,System.Int32,System.Int32,System.Int32)">AddCell(int, int, int, int)</h4>
<div class="markdown level1 summary"><p>Creates an empty table cell with default style at the specified position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TableCell AddCell(int rowIndex, int columnIndex, int rowSpan = 1, int columnSpan = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddCell(rowIndex As Integer, columnIndex As Integer, Optional rowSpan As Integer = 1, Optional columnSpan As Integer = 1) As TableCell</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">rowIndex</span></td>
      <td><p>Index of top row in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>Index of left column in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowSpan</span></td>
      <td><p>The number of rows covered by a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnSpan</span></td>
      <td><p>The number of columns covered by a cell.</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.Drawing.TableCell.html">TableCell</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Drawing.TableCell.html">TableCell</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*"></a>
<h4 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_GrapeCity_Documents_Drawing_CellStyle_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell(GrapeCity.Documents.Drawing.CellStyle,System.Int32,System.Int32,System.Int32,System.Int32)">AddCell(CellStyle, int, int, int, int)</h4>
<div class="markdown level1 summary"><p>Creates an empty table cell with given style at the specified position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TableCell AddCell(CellStyle cellStyle, int rowIndex, int columnIndex, int rowSpan = 1, int columnSpan = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddCell(cellStyle As CellStyle, rowIndex As Integer, columnIndex As Integer, Optional rowSpan As Integer = 1, Optional columnSpan As Integer = 1) As TableCell</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.Drawing.CellStyle.html">CellStyle</a></td>
      <td><span class="parametername">cellStyle</span></td>
      <td><p>The style of the cell, or <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> to use the default style.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowIndex</span></td>
      <td><p>Index of top row in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>Index of left column in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowSpan</span></td>
      <td><p>The number of rows covered by a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnSpan</span></td>
      <td><p>The number of columns covered by a cell.</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.Drawing.TableCell.html">TableCell</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Drawing.TableCell.html">TableCell</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*"></a>
<h4 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_System_Int32_System_Int32_System_Object_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell(System.Int32,System.Int32,System.Object)">AddCell(int, int, object)</h4>
<div class="markdown level1 summary"><p>Creates a table cell with default style and a new <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> inside.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TableCell AddCell(int rowIndex, int columnIndex, object data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddCell(rowIndex As Integer, columnIndex As Integer, data As Object) As TableCell</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">rowIndex</span></td>
      <td><p>Index of top row in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>Index of left column in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>A data object or string to be displayed in the cell.</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.Drawing.TableCell.html">TableCell</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Drawing.TableCell.html">TableCell</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*"></a>
<h4 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_GrapeCity_Documents_Drawing_CellStyle_System_Int32_System_Int32_System_Object_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell(GrapeCity.Documents.Drawing.CellStyle,System.Int32,System.Int32,System.Object)">AddCell(CellStyle, int, int, object)</h4>
<div class="markdown level1 summary"><p>Creates a table cell with given style and a new <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> inside.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TableCell AddCell(CellStyle cellStyle, int rowIndex, int columnIndex, object data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddCell(cellStyle As CellStyle, rowIndex As Integer, columnIndex As Integer, data As Object) As TableCell</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.Drawing.CellStyle.html">CellStyle</a></td>
      <td><span class="parametername">cellStyle</span></td>
      <td><p>The style of the cell, or <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> to use the default style.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowIndex</span></td>
      <td><p>Index of top row in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>Index of left column in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>A data object or string to be displayed in the cell.</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.Drawing.TableCell.html">TableCell</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Drawing.TableCell.html">TableCell</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*"></a>
<h4 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_System_Int32_System_Int32_System_Int32_System_Int32_System_Object_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell(System.Int32,System.Int32,System.Int32,System.Int32,System.Object)">AddCell(int, int, int, int, object)</h4>
<div class="markdown level1 summary"><p>Creates a table cell with default style and a new <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> inside.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TableCell AddCell(int rowIndex, int columnIndex, int rowSpan, int columnSpan, object data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddCell(rowIndex As Integer, columnIndex As Integer, rowSpan As Integer, columnSpan As Integer, data As Object) As TableCell</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">rowIndex</span></td>
      <td><p>Index of top row in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>Index of left column in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowSpan</span></td>
      <td><p>The number of rows covered by a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnSpan</span></td>
      <td><p>The number of columns covered by a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>A data object or string to be displayed in the cell.</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.Drawing.TableCell.html">TableCell</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Drawing.TableCell.html">TableCell</a> object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell*"></a>
<h4 id="GrapeCity_Documents_Drawing_TableRenderer_AddCell_GrapeCity_Documents_Drawing_CellStyle_System_Int32_System_Int32_System_Int32_System_Int32_System_Object_" data-uid="GrapeCity.Documents.Drawing.TableRenderer.AddCell(GrapeCity.Documents.Drawing.CellStyle,System.Int32,System.Int32,System.Int32,System.Int32,System.Object)">AddCell(CellStyle, int, int, int, int, object)</h4>
<div class="markdown level1 summary"><p>Creates a table cell with given style and a new <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> inside.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TableCell AddCell(CellStyle cellStyle, int rowIndex, int columnIndex, int rowSpan, int columnSpan, object data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddCell(cellStyle As CellStyle, rowIndex As Integer, columnIndex As Integer, rowSpan As Integer, columnSpan As Integer, data As Object) As TableCell</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.Drawing.CellStyle.html">CellStyle</a></td>
      <td><span class="parametername">cellStyle</span></td>
      <td><p>The style of the cell, or <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> to use the default style.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowIndex</span></td>
      <td><p>Index of top row in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnIndex</span></td>
      <td><p>Index of left column in the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowSpan</span></td>
      <td><p>The number of rows covered by a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnSpan</span></td>
      <td><p>The number of columns covered by a cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>A data object or string to be displayed in the cell.</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.Drawing.TableCell.html">TableCell</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Drawing.TableCell.html">TableCell</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
