Back to Devexpress

WorksheetVisibilityType Enum

officefileapi-devexpress-dot-spreadsheet-39cb7da5.md

latest2.9 KB
Original Source

WorksheetVisibilityType Enum

Contains the values that specify worksheet visibility.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
[Flags]
public enum WorksheetVisibilityType
vb
<Flags>
Public Enum WorksheetVisibilityType

Members

NameDescription
Visible

A worksheet is visible.

| | Hidden |

A worksheet is hidden.

| | VeryHidden |

A worksheet is hidden and cannot be unhidden via the user interface.

|

The following properties accept/return WorksheetVisibilityType values:

Example

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.

View Example

csharp
// 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;
vb
' 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

How to: Show and Hide a Worksheet

DevExpress.Spreadsheet Namespace