Aspose::Cells::RowCollection class

RowCollection class

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

class RowCollection

Methods

MethodDescription
Clear()Clear all rows and cells.
Get(int32_t rowIndex)Gets a Row object by given row index. The Row object of given row index will be instantiated if it does not exist before.
GetCount()Gets the number of rows in this collection.
GetEnumerator()Gets an enumerator that iterates rows through this collection.
GetEnumerator(bool reversed, bool sync)Gets an enumerator that iterates rows through this collection.
GetRowByIndex(int32_t index)Gets the row object by the position in the list.
IsNull() constChecks whether the implementation object is nullptr.
explicit operator bool() constoperator bool()
operator=(const RowCollection& src)operator=
RemoveAt(int32_t index)Remove the row item at the specified index(position) in this collection.
RowCollection(RowCollection_Impl* impl)Constructs from an implementation object.
RowCollection(const RowCollection& src)Copy constructor.
~RowCollection()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;

//Obtaining the reference of the first worksheet
Worksheet worksheet = workbook.GetWorksheets().Get(0);
//Get first row
Row row = worksheet.GetCells().GetRows().Get(0);
Aspose::Cells::Cleanup();

See Also