Returns the number of rows in the range.
[Visual Basic] Property ReadOnly Count As Integer [C#] int Count { get; } [C++] __property int get_Count(); [JScript] function get Count() : int
This example displays the number of rows in the selection on sheet one.
[C#]
IWorksheet sheet = book.Worksheets[1];
MessageBox.Show(String.Format("The selection contains {0} rows", sheet.Selection.Rows.Count));
[Visual Basic]
Dim sheet As IWorksheet = book.Worksheets(1)
MessageBox.Show(String.Format("The selection contains {0} rows", sheet.Selection.Rows.Count))
[C++]
IWorksheet* sheet = book->Worksheets->Item[1];
MessageBox::Show(String::Format(S"The selection contains {0} rows", sheet->Selection->Rows->Count));
IRangeRows Interface | NativeExcel Namespace | IWorksheet.Selection Property | IRange.Rows Property