Class RowCollection
Contents
[
Hide
]RowCollection class
Collects the Row
objects that represent the individual rows in a worksheet.
public class RowCollection : IEnumerable
Properties
Name | Description |
---|---|
Count { get; } | Gets the number of rows in this collection. |
Item { get; } | Gets a Row object by given row index. The Row object of given row index will be instantiated if it does not exist before. |
Methods
Name | Description |
---|---|
Clear() | Clear all rows and cells. |
GetEnumerator() | Gets an enumerator that iterates rows through this collection |
GetEnumerator(bool, bool) | Gets an enumerator that iterates rows through this collection |
GetRowByIndex(int) | Gets the row object by the position in the list. |
RemoveAt(int) | Remove the row item at the specified index(position) in this collection. |
Examples
[C#]
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
//Get first row
Row row = worksheet.Cells.Rows[0];
[VB.NET]
'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook()
'Obtaining the reference of the first worksheet
Dim worksheet As Worksheet = workbook.Worksheets(0)
'Get first row
Dim row as Row = worksheet.Cells.Rows(0)
See Also
- namespace Aspose.Cells
- assembly Aspose.Cells