Worksheet.Rows Property
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
RowCollection | A RowCollection object specifying the worksheet’s collection of rows. |
Remarks
Use the Rows property to access an individual row in the worksheet or perform different operations over an individual or multiple rows (for example, group, insert or delete rows).
To work with worksheet columns, use the ColumnCollection object accessed via the Worksheet.Columns property.
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;
// ...
Workbook workbook = new Workbook();
// 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"];
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Rows property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.