NativeExcel for .Net Developer's Reference

IWorkbook.ActiveSheet Property

Returns an IWorksheet that represents the active worksheet in the specified workbook. Returns null if no worksheet is active.

[Visual Basic]
PropertyReadOnlyActiveSheetAsIWorksheet
[C#]
IWorksheetActiveSheet{get;}
[C++]
__propertyIWorksheet*get_ActiveSheet();
[JScript]
functiongetActiveSheet():IWorksheet

Property Value

IWorksheet interface.

Example

This example sets the name of the active sheet.

[C#]
book.ActiveSheet.Name = "NewName"; 
[VisualBasic]
book.ActiveSheet.Name = "NewName"
[C++]
book->ActiveSheet->Name = S"NewName";

See Also

IWorkbook Interface | NativeExcel Namespace | IWorksheet Interface | IWorksheet.Activate Method