NativeExcel for .Net Developer's Reference

IWorkbook.Worksheets Property

Returns an IWorksheets interface that represents all the worksheets in the specified workbook.

[Visual Basic]
PropertyReadOnlyWorksheetsAsIWorksheets
[C#]
IWorksheetsWorksheets{get;}
[C++]
__propertyIWorksheets*get_Worksheets();
[JScript]
functiongetWorksheets():IWorksheets

Property Value

IWorksheets interface.

Example

This example changes the name of sheet one

[C#]
book.Worksheets[1].Name = "First Sheet";
[VisualBasic]
book.Worksheets(1).Name = "First Sheet"
[C++]
book->Worksheets->Item[1]->Name = S"First Sheet";

See Also

IWorkbook Interface | NativeExcel Namespace | IWorksheets Interface