NativeExcel2 for .Net Developer's Reference

IWorksheet.Visible Property

Gets or sets a value that determines whether the worksheet is visible.

[Visual Basic]
PropertyVisibleAsXlSheetVisibility
[C#]
XlSheetVisibilityVisible{get;set;}
[C++]
__propertyXlSheetVisibilityget_Visible();
__propertyvoidset_Visible(XlSheetVisibility);
[JScript]
functiongetVisible():XlSheetVisibility
functionsetVisible(XlSheetVisibility);

Property Value

Visible can be one of XlSheetVisibility values.

Example

This example makes the worksheet two invisible.

[C#]
book.Worksheets[2].Visible = XlSheetVisibility.xlSheetHidden;
[VisualBasic]
book.Worksheets(2).Visible = XlSheetVisibility.xlSheetHidden
[C++]
book->Worksheets->Item[2]->Visible = XlSheetVisibility::xlSheetHidden;

See Also

IWorksheet Interface | NativeExcel Namespace | XlSheetVisibility Enumeration