Enum ViewType

ViewType enumeration

Represents the view type of the worksheet.

public enum ViewType

Values

NameValueDescription
NormalView0
PageBreakPreview1
PageLayoutView2

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class ViewTypeDemo
    {
        public static void ViewTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            
            // Access the first worksheet
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Set the view type of the worksheet to PageBreakPreview
            worksheet.ViewType = ViewType.PageBreakPreview;
            
            // Save the workbook
            workbook.Save("ViewTypeExample.xlsx");

            return;
        }
    }
}

See Also