Version

Rows Property

Gets the collection of rows in the worksheet.
Syntax
public WorksheetRowCollection Rows {get;}

Property Value

The collection of rows in the worksheet.
Remarks

The collection of rows is a fixed length collection, with the maximum number of rows in the collection being Workbook.MaxExcelRowCount or Workbook.MaxExcel2007RowCount, depending on the Workbook.CurrentFormat. Internally, the rows are only created and added to the collection when they are requested.

Note: Iterating the collection will not create all rows. It will only iterate the rows which have already been used. To create and iterate all rows in the worksheet use a For loop, iterating from 0 to one less than the maximum row count, and pass in each index to the collection's indexer.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also