Enum PaneStateType

PaneStateType enumeration

Represents state of the sheet’s pane.

public enum PaneStateType

Values

NameValueDescription
Frozen0Panes are frozen, but were not before being frozen.
FrozenSplit1Panes are frozen and were split before being frozen.
Split2Panes are split, but not frozen.
Normal3Panes are not frozen and not split.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class PaneStateTypeDemo
    {
        public static void PaneStateTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();

            // Add a new worksheet to the workbook
            Worksheet worksheet = workbook.Worksheets[0];

            // Set some sample data in the worksheet
            worksheet.Cells["A1"].PutValue("Data 1");
            worksheet.Cells["A2"].PutValue("Data 2");
            worksheet.Cells["A3"].PutValue("Data 3");
            worksheet.Cells["B1"].PutValue(10);
            worksheet.Cells["B2"].PutValue(20);
            worksheet.Cells["B3"].PutValue(30);

            // Freeze panes at cell B2
            worksheet.FreezePanes(1, 0, 1, 1); // Freeze the first row and first column

            // Check the pane state
            PaneStateType paneState = worksheet.PaneState;

            // Output the pane state
            Console.WriteLine("Current Pane State: " + paneState);

            // Save the workbook
            workbook.Save("PaneStateTypeExample.xlsx");
        }
    }
}

See Also