NativeExcel2 for .Net Developer's Reference

IWorksheet.Name Property

Gets or sets the name of the Worksheet.

[Visual Basic]
PropertyNameAsString
[C#]
stringName{get;set;}
[C++]
__propertyString*get_Name();
__propertyvoidset_Name(String*);
[JScript]
functiongetName():String
functionsetName(String);

Example

This example creates new worksheet and sets the name.

[C#]
IWorkbook book = NativeExcel.Factory.CreateWorkbook();
IWorksheet sheet = book.Worksheets.Add();  
sheet.Name = "FirstSheet"; 
[VisualBasic]
Dim book As IWorkbook = NativeExcel.Factory.CreateWorkbook()
Dim sheet As IWorksheet = book.Worksheets.Add()  
sheet.Name = "FirstSheet"
[C++]
IWorkbook* book = NativeExcel::Factory::CreateWorkbook();
IWorksheet* sheet = book->Worksheets->Add();  
sheet->Name = S"FirstSheet";

See Also

IWorksheet Interface | NativeExcel Namespace | IWorksheets.Item[String] Property