# FarPoint.Win.Spread.SheetView.FillRange

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_SheetView_FillRange_" data-uid="FarPoint.Win.Spread.SheetView.FillRange*">FillRange Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_SheetView_FillRange_" data-uid="FarPoint.Win.Spread.SheetView.FillRange*"></a>
<h4 id="FarPoint_Win_Spread_SheetView_FillRange_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Win_Spread_FillDirection_" data-uid="FarPoint.Win.Spread.SheetView.FillRange(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Win.Spread.FillDirection)">FillRange(int, int, int, int, int, FillDirection)</h4>
<div class="markdown level1 summary"><p>Fills a range of cells on this sheet by copying a specified range in the specified direction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void FillRange(int row, int column, int rowCount, int columnCount, int fillCount, FillDirection fillDirection)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub FillRange(row As Integer, column As Integer, rowCount As Integer, columnCount As Integer, fillCount As Integer, fillDirection As FillDirection)</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">row</span></td>
      <td><p>Row index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>Column index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowCount</span></td>
      <td><p>Number of rows in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnCount</span></td>
      <td><p>Number of columns in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fillCount</span></td>
      <td><p>Number of rows or columns into which to copy the specified range</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.FillDirection.html">FillDirection</a></td>
      <td><span class="parametername">fillDirection</span></td>
      <td><p>Direction of fill (to copy the specified range)</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row index is not valid; must be between -1 and the total number of rows</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column index is not valid; must be between -1 and the total number of columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row count is not valid; must be -1 or
between 0 and the total number of rows minus the current row index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column count is not valid; must be -1 or
between 0 and the total number of columns minus the current column index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified number of rows or columns (fill count) is not valid; must be -1 or
between 0 and the total number of rows or columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.invalidenumargumentexception">InvalidEnumArgumentException</a></td>
      <td><p>Specified direction of the fill is not valid;
must be one of the allowed enumeration settings</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_SheetView_FillRange_" data-uid="FarPoint.Win.Spread.SheetView.FillRange*"></a>
<h4 id="FarPoint_Win_Spread_SheetView_FillRange_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Win_Spread_FillDirection_System_Boolean_" data-uid="FarPoint.Win.Spread.SheetView.FillRange(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Win.Spread.FillDirection,System.Boolean)">FillRange(int, int, int, int, int, FillDirection, bool)</h4>
<div class="markdown level1 summary"><p>Fills a range of cells on this sheet by copying a specified range in the specified direction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void FillRange(int row, int column, int rowCount, int columnCount, int fillCount, FillDirection fillDirection, bool dataOnly)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub FillRange(row As Integer, column As Integer, rowCount As Integer, columnCount As Integer, fillCount As Integer, fillDirection As FillDirection, dataOnly As Boolean)</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">row</span></td>
      <td><p>Row index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>Column index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowCount</span></td>
      <td><p>Number of rows in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnCount</span></td>
      <td><p>Number of columns in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fillCount</span></td>
      <td><p>Number of rows or columns into which to copy the specified range</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.FillDirection.html">FillDirection</a></td>
      <td><span class="parametername">fillDirection</span></td>
      <td><p>Direction of fill (to copy the specified range)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">dataOnly</span></td>
      <td><p>Whether to fill data only (or also styles and spans)</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row index is not valid; must be between -1 and the total number of rows</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column index is not valid; must be between -1 and the total number of columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row count is not valid; must be -1 or
between 0 and the total number of rows minus the current row index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column count is not valid; must be -1 or
between 0 and the total number of columns minus the current column index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified number of rows or columns (fill count) is not valid; must be -1 or
between 0 and the total number of rows or columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.invalidenumargumentexception">InvalidEnumArgumentException</a></td>
      <td><p>Specified direction of the fill is not valid;
must be one of the allowed enumeration settings</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_SheetView_FillRange_" data-uid="FarPoint.Win.Spread.SheetView.FillRange*"></a>
<h4 id="FarPoint_Win_Spread_SheetView_FillRange_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Win_Spread_FillDirection_System_Boolean_System_Boolean_" data-uid="FarPoint.Win.Spread.SheetView.FillRange(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Win.Spread.FillDirection,System.Boolean,System.Boolean)">FillRange(int, int, int, int, int, FillDirection, bool, bool)</h4>
<div class="markdown level1 summary"><p>Fills a range of cells on this sheet by copying a specified range in the specified direction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void FillRange(int row, int column, int rowCount, int columnCount, int fillCount, FillDirection fillDirection, bool dataOnly, bool valuesOnly)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub FillRange(row As Integer, column As Integer, rowCount As Integer, columnCount As Integer, fillCount As Integer, fillDirection As FillDirection, dataOnly As Boolean, valuesOnly As Boolean)</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">row</span></td>
      <td><p>Row index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>Column index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowCount</span></td>
      <td><p>Number of rows in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnCount</span></td>
      <td><p>Number of columns in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fillCount</span></td>
      <td><p>Number of rows or columns into which to copy the specified range</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.FillDirection.html">FillDirection</a></td>
      <td><span class="parametername">fillDirection</span></td>
      <td><p>Direction of fill (to copy the specified range)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">dataOnly</span></td>
      <td><p>Whether to fill data only (or also styles and spans)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">valuesOnly</span></td>
      <td><p>Whether to fill in values only (or also formulas, notes, and tags)</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row index is not valid; must be between -1 and the total number of rows</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column index is not valid; must be between -1 and the total number of columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row count is not valid; must be -1 or
between 0 and the total number of rows minus the current row index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column count is not valid; must be -1 or
between 0 and the total number of columns minus the current column index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified number of rows or columns (fill count) is not valid; must be -1 or
between 0 and the total number of rows or columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.invalidenumargumentexception">InvalidEnumArgumentException</a></td>
      <td><p>Specified direction of the fill is not valid;
must be one of the allowed enumeration settings</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
      <td><p>Specified target range contains one or more cell spans so the operation cannot be completed.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_SheetView_FillRange_" data-uid="FarPoint.Win.Spread.SheetView.FillRange*"></a>
<h4 id="FarPoint_Win_Spread_SheetView_FillRange_System_Int32_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Win_Spread_FillDirection_System_Boolean_System_Boolean_System_Boolean_FarPoint_Win_Spread_CustomFillSeriesList_" data-uid="FarPoint.Win.Spread.SheetView.FillRange(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Win.Spread.FillDirection,System.Boolean,System.Boolean,System.Boolean,FarPoint.Win.Spread.CustomFillSeriesList)">FillRange(int, int, int, int, int, FillDirection, bool, bool, bool, CustomFillSeriesList)</h4>
<div class="markdown level1 summary"><p>Fills a range of cells on this sheet by copying a specified range in the specified direction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void FillRange(int row, int column, int rowCount, int columnCount, int fillCount, FillDirection fillDirection, bool dataOnly, bool valuesOnly, bool isFillBySeries, CustomFillSeriesList dataIncrementCustomList)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub FillRange(row As Integer, column As Integer, rowCount As Integer, columnCount As Integer, fillCount As Integer, fillDirection As FillDirection, dataOnly As Boolean, valuesOnly As Boolean, isFillBySeries As Boolean, dataIncrementCustomList As CustomFillSeriesList)</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">row</span></td>
      <td><p>Row index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>Column index of the starting cell in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowCount</span></td>
      <td><p>Number of rows in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">columnCount</span></td>
      <td><p>Number of columns in the range to copy</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fillCount</span></td>
      <td><p>Number of rows or columns into which to copy the specified range</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.FillDirection.html">FillDirection</a></td>
      <td><span class="parametername">fillDirection</span></td>
      <td><p>Direction of fill (to copy the specified range)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">dataOnly</span></td>
      <td><p>Whether to fill data only (or also styles and spans)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">valuesOnly</span></td>
      <td><p>Whether to fill in values only (or also formulas, notes, and tags)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isFillBySeries</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.CustomFillSeriesList.html">CustomFillSeriesList</a></td>
      <td><span class="parametername">dataIncrementCustomList</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row index is not valid; must be between -1 and the total number of rows</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column index is not valid; must be between -1 and the total number of columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row count is not valid; must be -1 or
between 0 and the total number of rows minus the current row index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified column count is not valid; must be -1 or
between 0 and the total number of columns minus the current column index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified number of rows or columns (fill count) is not valid; must be -1 or
between 0 and the total number of rows or columns</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.invalidenumargumentexception">InvalidEnumArgumentException</a></td>
      <td><p>Specified direction of the fill is not valid;
must be one of the allowed enumeration settings</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
      <td><p>Specified target range contains one or more cell spans so the operation cannot be completed.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
