NativeExcel for .Net Developer's Reference

IRangeRows.Item Property

Returns a single row or subsequence of rows from the specified rows collection.

Overload List

Returns an IRangeRow interface that represents a row by using row index number.

[Visual Basic] Default Property ReadOnly Item(ByVal Integer) As IRangeRow
[C#] IRangeRow this[int] { get; }
[C++] __property IRangeRow* get_Item(int);

Returns IRangeRows interface that represents a subsequence or rows.

[Visual Basic] Default Property ReadOnly Item(ByVal Integer,ByVal Integer) As IRangeRows
[C#] IRangeRows this[int,int] { get; }
[C++] __property IRangeRows* get_Item(int,int);

Example

This example sets the height of the first row in the UsedRange.

[C#]
 book.Worksheets[1].UsedRange.Rows[1].RowHeight = 20; 
[Visual Basic]
 book.Worksheets[1].UsedRange.Rows(1).RowHeight = 20
[C++]
 book->Worksheets->Item[1]->UsedRange->Rows;->Item[1]->RowHeight = 20;
This example sets the height of rows one through five in the UsedRange.
[C#]
 book.Worksheets[1].UsedRange.Rows[1,5].RowHeight = 20; 
[Visual Basic]
 book.Worksheets[1].UsedRange.Rows(1,5).RowHeight = 20
[C++]
 book->Worksheets->Item[1]->UsedRange->Rows->Item[1,5]->RowHeight = 20;

See Also

IRangeRows Interface | NativeExcel Namespace | IRangeRow Interface