officefileapi-devexpress-dot-spreadsheet-dot-worksheetview.md
Gets or sets a view to display worksheet content.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
WorksheetViewType ViewType { get; set; }
Property ViewType As WorksheetViewType
| Type | Description |
|---|---|
| WorksheetViewType |
A WorksheetViewType enumeration member.
|
Available values:
| Name | Description |
|---|---|
| Normal |
Worksheet content is displayed in the Normal view.
| | PageLayout |
Worksheet content is displayed in the Page Layout view.
| | PageBreakPreview |
Worksheet content is displayed in the Page Break Preview view.
|
Use the ViewType property to specify which view should be used to display the worksheet content when the workbook is opened in Microsoft® Excel®.
The current versions of the WinForms, WPF and ASP.NET spreadsheet controls support the Normal worksheet view only.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ViewType property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
// Select the worksheet view type.
workbook.Worksheets[0].ActiveView.ViewType = WorksheetViewType.PageLayout;
#endregion #ViewType
' Select the worksheet view type.
workbook.Worksheets(0).ActiveView.ViewType = WorksheetViewType.PageLayout
#End Region ' #ViewType
See Also