# C1.C1Excel.XLSheet.SetRangeToRepeat

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Excel_XLSheet_SetRangeToRepeat_" data-uid="C1.C1Excel.XLSheet.SetRangeToRepeat*">SetRangeToRepeat Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Excel_XLSheet_SetRangeToRepeat_" data-uid="C1.C1Excel.XLSheet.SetRangeToRepeat*"></a>
<h4 id="C1_C1Excel_XLSheet_SetRangeToRepeat_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="C1.C1Excel.XLSheet.SetRangeToRepeat(System.Int32,System.Int32,System.Int32,System.Int32)">SetRangeToRepeat(int, int, int, int)</h4>
<div class="markdown level1 summary"><p>Specifies the range of rows or/and columns to use as print titles for this worksheet.
(Print titles are rows repeated at top, and columns repeated at left of each page
when the sheet is printed.)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetRangeToRepeat(int rowFrom, int rowTo, int colFrom = -1, int colTo = -1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetRangeToRepeat(rowFrom As Integer, rowTo As Integer, Optional colFrom As Integer = -1, Optional colTo As Integer = -1)</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">rowFrom</span></td>
      <td><p>Index of the first title row (repeated at top).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowTo</span></td>
      <td><p>Index of the last title row (repeated at top).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">colFrom</span></td>
      <td><p>Index of the first title column (repeated at left).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">colTo</span></td>
      <td><p>Index of the last title column (repeated at left).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
