Returns the number of worksheets in the collection.
[Visual Basic] Property ReadOnly Count As Integer [C#] int Count { get; } [C++] __property int get_Count(); [JScript] function get Count() : int
Integer. The number of worksheets in the IWorksheets collection.
This example uses the Count property to set the value of A1 cell on the first sheet.
[C#]
book.Worksheets[1].Range["A1"].Value = book.Worksheets.Count;
[Visual Basic]
book.Worksheets(1).Range("A1").Value = book.Worksheets.Count
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1"]->Value = book->Worksheets->Count;
IWorksheets Interface | NativeExcel Namespace