NativeExcel for .Net Developer's Reference

IWorksheet.View Property

Returns or sets the view showing in the window.

[Visual Basic]
PropertyViewAsXlWindowView
[C#]
XlWindowViewView{get;set;}
[C++]
__propertyXlWindowViewget_View();
__propertyvoidset_View(XlWindowView);
[JScript]
functiongetView():XlWindowView
functionsetView(XlWindowView);

Property Value

Can be one of XlWindowView constants.

Example

This example switches the view in the sheet one to page break preview.

[C#]
book.Worksheets[1].View = XlWindowView.xlPageBreakPreview;
[VisualBasic]
book.Worksheets(1).View = XlWindowView.xlPageBreakPreview
[C++]
book->Worksheets->Item[1]->View = XlWindowView::xlPageBreakPreview;

See Also

IWorksheet Interface | NativeExcel Namespace | XlWindowView Enumeration