# C1.WPF.Excel.XLRowCollection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Excel_XLRowCollection" data-uid="C1.WPF.Excel.XLRowCollection" class="text-break">XLRowCollection Class
</h1>
  <div class="markdown level0 summary"><p>Represents a collection of <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> objects that represent the
individual rows in each <a class="xref" href="C1.WPF.Excel.XLSheet.html">XLSheet</a>.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">XLRowCollection</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Excel.html">C1.WPF.Excel</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Excel.4.6.2.dll</h6>
  <h5 id="C1_WPF_Excel_XLRowCollection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class XLRowCollection : IEnumerable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class XLRowCollection
    Implements IEnumerable</code></pre>
  </div>
  <h5 id="C1_WPF_Excel_XLRowCollection_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>The collection has methods for counting, enumerating, adding, and removing
rows from the collection.</p>
</div>
  <h5 id="C1_WPF_Excel_XLRowCollection_examples"><strong>Examples</strong></h5>
  <p>Note that you can create rows automatically by using the sheet's indexer.
For example, the following code retrieves the cell at coordinates (3,3)
and in doing so automatically creates four rows and four columns automatically:</p>
<pre><code class="lang-csharp">C1XLBook book = new C1XLBook();
sheet = book.Sheets[0];
XLCell cell   = sheet[3,3]; // creates 4 rows and 4 columns</code></pre>

  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Book" data-uid="C1.WPF.Excel.XLRowCollection.Book">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Book.html#C1_WPF_Excel_XLRowCollection_Book">Book</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a reference to the parent <a class="xref" href="C1.WPF.Excel.C1XLBook.html">C1XLBook</a> object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Count" data-uid="C1.WPF.Excel.XLRowCollection.Count">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Count.html#C1_WPF_Excel_XLRowCollection_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of items in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Frozen" data-uid="C1.WPF.Excel.XLRowCollection.Frozen">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Frozen.html#C1_WPF_Excel_XLRowCollection_Frozen">Frozen</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the number of frozen rows in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Item_System_Int32_" data-uid="C1.WPF.Excel.XLRowCollection.Item(System.Int32)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Item.html#C1_WPF_Excel_XLRowCollection_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a reference to the <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object at the specified index.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Sheet" data-uid="C1.WPF.Excel.XLRowCollection.Sheet">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Sheet.html#C1_WPF_Excel_XLRowCollection_Sheet">Sheet</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a reference to the parent <a class="xref" href="C1.WPF.Excel.XLSheet.html">XLSheet</a> object.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Add" data-uid="C1.WPF.Excel.XLRowCollection.Add">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Add.html#C1_WPF_Excel_XLRowCollection_Add">Add()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object and adds it to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Add_C1_WPF_Excel_XLRow_" data-uid="C1.WPF.Excel.XLRowCollection.Add(C1.WPF.Excel.XLRow)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Add.html#C1_WPF_Excel_XLRowCollection_Add_C1_WPF_Excel_XLRow_">Add(XLRow)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds an <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Clear" data-uid="C1.WPF.Excel.XLRowCollection.Clear">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Clear.html#C1_WPF_Excel_XLRowCollection_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all items from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Contains_C1_WPF_Excel_XLRow_" data-uid="C1.WPF.Excel.XLRowCollection.Contains(C1.WPF.Excel.XLRow)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Contains.html#C1_WPF_Excel_XLRowCollection_Contains_C1_WPF_Excel_XLRow_">Contains(XLRow)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether an <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> is a member of the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_IndexOf_C1_WPF_Excel_XLRow_" data-uid="C1.WPF.Excel.XLRowCollection.IndexOf(C1.WPF.Excel.XLRow)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.IndexOf.html#C1_WPF_Excel_XLRowCollection_IndexOf_C1_WPF_Excel_XLRow_">IndexOf(XLRow)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the index of a given <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Insert_System_Int32_" data-uid="C1.WPF.Excel.XLRowCollection.Insert(System.Int32)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Insert.html#C1_WPF_Excel_XLRowCollection_Insert_System_Int32_">Insert(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object and inserts it at a
specific position in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Insert_System_Int32_C1_WPF_Excel_XLRow_" data-uid="C1.WPF.Excel.XLRowCollection.Insert(System.Int32,C1.WPF.Excel.XLRow)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Insert.html#C1_WPF_Excel_XLRowCollection_Insert_System_Int32_C1_WPF_Excel_XLRow_">Insert(int, XLRow)</a>
        </td>
        <td class="markdown level1 summary"><p>Inserts an <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object at a specific position in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_Remove_C1_WPF_Excel_XLRow_" data-uid="C1.WPF.Excel.XLRowCollection.Remove(C1.WPF.Excel.XLRow)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.Remove.html#C1_WPF_Excel_XLRowCollection_Remove_C1_WPF_Excel_XLRow_">Remove(XLRow)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes an <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Excel_XLRowCollection_RemoveAt_System_Int32_" data-uid="C1.WPF.Excel.XLRowCollection.RemoveAt(System.Int32)">
          <a class="xref" href="C1.WPF.Excel.XLRowCollection.RemoveAt.html#C1_WPF_Excel_XLRowCollection_RemoveAt_System_Int32_">RemoveAt(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the <a class="xref" href="C1.WPF.Excel.XLRow.html">XLRow</a> object at a given position from the collection.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
