# GrapeCity.Spreadsheet.IRange.CreateTable

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_IRange_CreateTable_" data-uid="GrapeCity.Spreadsheet.IRange.CreateTable*">CreateTable Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_IRange_CreateTable_" data-uid="GrapeCity.Spreadsheet.IRange.CreateTable*"></a>
<h4 id="GrapeCity_Spreadsheet_IRange_CreateTable_System_Boolean_System_String_System_String_" data-uid="GrapeCity.Spreadsheet.IRange.CreateTable(System.Boolean,System.String,System.String)">CreateTable(bool, string, string)</h4>
<div class="markdown level1 summary"><p>Creates the <a class="xref" href="GrapeCity.Spreadsheet.ITable.html">ITable</a> at the specified cell range.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">ITable CreateTable(bool includeHeaders, string name = null, string tableStyle = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function CreateTable(includeHeaders As Boolean, Optional name As String = Nothing, Optional tableStyle As String = Nothing) As ITable</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.boolean">bool</a></td>
      <td><span class="parametername">includeHeaders</span></td>
      <td><p>if set to <code>true</code>, the first row of the specified cell range will be used as table header.</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>A string value indicates the table name. If you won't provide, table name will be generated automatically.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">tableStyle</span></td>
      <td><p>A string value indicates the table style. Default value is TableStyleMedium2.</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.ITable.html">ITable</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.ITable.html">ITable</a> object represents the created table. <code>null</code> if the table cannot be created.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
