The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

Worksheet.Visible Property

Gets or sets whether the current worksheet is visible or hidden.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

bool Visible { get; set; }
Property Visible As Boolean
bool Visible { get; set; }
Property Visible As Boolean
bool Visible { get; set; }
Property Visible As Boolean

Property Value

Type Description
Boolean

true, if the worksheet is visible; otherwise, false.

Property Value

Type Description
Boolean

true, if the worksheet is visible; otherwise, false.

Property Value

Type Description
Boolean

true, if the worksheet is visible; otherwise, false.

Remarks

Use the Visible property to control the visibility of the worksheet. To hide and unhide a worksheet, you can also use the Worksheet.VisibilityType property. It allows you to mark a worksheet as "very hidden". In this mode, the worksheet cannot be accessed by end-users.

If you hide a worksheet that is currently active, the next visible worksheet to the right of this worksheet is automatically activated. If there are no visible worksheets to the right of the hidden worksheet, the first visible worksheet to the left of this worksheet becomes active.

Note

A workbook must always contain at least one visible worksheet.

Examples

This example demonstrates how to manage worksheet visibility in a workbook. To do this, use the following properties.

Note

A workbook must always contain at least one visible worksheet.

// Hide the worksheet under the "Sheet2" name and prevent end-users from unhiding it via user interface.
// To make this worksheet visible again, use the Worksheet.Visible property.
workbook.Worksheets["Sheet2"].VisibilityType = WorksheetVisibilityType.VeryHidden;

// Hide the "Sheet3" worksheet. 
// In this state a worksheet can be unhidden via user interface.
workbook.Worksheets["Sheet3"].Visible = false;
See Also