Version

Item Property (WorksheetCellCollection)

Gets the cell at the specified column index in the owning row.
Syntax
public WorksheetCell this[ 
   int index
]; {get;}

Parameters

index
The zero-based column index of the cell to get.

Property Value

The cell at the specified column index in the owning row.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionindex is less than zero.
System.InvalidOperationExceptionIf the row was removed from the worksheet.index is greater than or equal to Workbook.MaxExcelColumnCount or Workbook.MaxExcel2007ColumnCount, depending on the CurrentFormat.
System.InvalidOperationExceptionIf the row was removed from the worksheet.
Remarks

Note: Iterating the collection will not create all cells. It will only iterate the cells which have already been used. To create and iterate all cells in the worksheet use a For loop, iterating from 0 to one less than the maximum column 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