Version

Item Property (WorksheetRowCollection)

Gets the row at the specified index.
Syntax
'Declaration
 
Public ReadOnly Default Property Item( _
   ByVal index As System.Integer _
) As WorksheetRow
public WorksheetRow this[ 
   System.int index
]; {get;}

Parameters

index
The zero-based index of the row to get.

Property Value

The row at the specified index.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionindex is less than zero.
System.InvalidOperationExceptionindex is greater than or equal to Workbook.MaxExcelRowCount or Workbook.MaxExcel2007RowCount, depending on the CurrentFormat.
Remarks

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: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

View on GitHub