RowCollection Interface
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Related API Members
The following members return RowCollection objects:
Remarks
Worksheet cells are organized into 1,048,576 rows and 16,384 columns. Rows are stored in the RowCollection object. Use the Worksheet.Rows property to access this object. The RowCollection.Item property enables you to get an individual row by its heading or index in the collection.
To add a new row to the worksheet, use the RowCollection.Insert method. To remove a row from the worksheet, use the RowCollection.Remove method. For details on how to manage worksheet rows, see the Rows and Columns section of examples.
Example
This example demonstrates how to access rows in a worksheet. Use the Worksheet.Rows property to get a collection of rows contained in a worksheet (the RowCollection
object). To get an individual row by its index (zero-based) or heading (“1”, “2”, “3”, etc.), use the RowCollection.Item property.
using DevExpress.Spreadsheet;
// ...
IWorkbook workbook = spreadsheetControl1.Document;
// Access a collection of rows.
RowCollection rows = workbook.Worksheets[0].Rows;
// Access the first row by its index in the collection of rows.
Row firstRow_byIndex = rows[0];
// Access the first row by its unique name.
Row firstRow_byName = rows["1"];