RowCollection class

RowCollection class

Collects the Row objects that represent the individual rows in a worksheet.

The RowCollection type exposes the following members:

Properties

PropertyDescription
countGets the number of rows in this collection.

Gets a Row object by given row index. The Row object of given row index will be instantiated if it does not exist before.

Indexer

NameDescription
[index]

Methods

MethodDescription
get_enumerator(self, reversed, sync)Gets an enumerator that iterates rows through this collection
get_row_by_index(self, index)Gets the row object by the position in the list.
clear(self)Clear all rows and cells.
remove_at(self, index)Remove the row item at the specified index(position) in this collection.

Example

from aspose.cells import Workbook

# Instantiating a Workbook object
workbook = Workbook()
# Obtaining the reference of the first worksheet
worksheet = workbook.worksheets[0]
# Get first row
row = worksheet.cells.rows[0]

See Also