Enum VisibilityType

VisibilityType enumeration

Represents the states for sheet visibility.

public enum VisibilityType

Values

NameValueDescription
Visible0Indicates the sheet is visible.
Hidden1Indicates the sheet is hidden, but can be shown by the user via the user interface.
VeryHidden2Indicates the sheet is hidden and cannot be shown in the user interface (UI). This state is only available programmatically.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class VisibilityTypeDemo
    {
        public static void VisibilityTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            workbook.Worksheets.Add("NewSheet");
            
            // Access the first worksheet
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Set the name of the worksheet
            worksheet.Name = "DemoSheet";

            // Set the visibility of the worksheet to Hidden
            worksheet.VisibilityType = VisibilityType.Hidden;

            // Save the workbook
            workbook.Save("VisibilityTypeExample.xlsx");

            // Output to indicate the process is complete
            Console.WriteLine("Workbook saved with the worksheet visibility set to Hidden.");
        }
    }
}

See Also