[]
        
(Showing Draft Content)

C1.Excel.XLRowCollection

XLRowCollection Class

Represents a collection of XLRow objects that represent the individual rows in each XLSheet.

Inheritance
XLRowCollection
Implements
Namespace: C1.Excel
Assembly: C1.Excel.dll
Syntax
public class XLRowCollection : IEnumerable
Remarks

The collection has methods for counting, enumerating, adding, and removing rows from the collection.

Examples

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:

C1XLBook book = new C1XLBook();
sheet = book.Sheets[0];
XLCell cell   = sheet[3,3]; // creates 4 rows and 4 columns

Properties

Name Description
Book

Gets a reference to the parent C1XLBook object.

Count

Gets the number of items in the collection.

Frozen

Gets or sets the number of frozen rows in the collection.

this[int]

Returns a reference to the XLRow object at the specified index.

Sheet

Gets a reference to the parent XLSheet object.

Methods

Name Description
Add()

Creates a new XLRow object and adds it to the collection.

Add(XLRow)

Adds an XLRow object to the collection.

Clear()

Removes all items from the collection.

Contains(XLRow)

Determines whether an XLRow is a member of the collection.

IndexOf(XLRow)

Gets the index of a given XLRow object in the collection.

Insert(int)

Creates a new XLRow object and inserts it at a specific position in the collection.

Insert(int, XLRow)

Inserts an XLRow object at a specific position in the collection.

Remove(XLRow)

Removes an XLRow object from the collection.

RemoveAt(int)

Removes the XLRow object at a given position from the collection.