Wiki Markup |
---|
{description} {excerpt}Sets or returns the worksheet's viewing mode.{excerpt} {signature:C#} public SheetViewState ViewState{ get; set; } {signature}{signature:vb.net} Public Property ViewState() As SheetViewState {signature} {example}{code:csharp|title=C#} //--- Get ViewState Worksheet.SheetViewState state = ws.ViewState; //--- Set ViewState ws.ViewState = Worksheet.SheetViewState.PageBreak; {code} {code:vb.net|title=vb.net} '--- Get ViewState Dim state As Worksheet.SheetViewState = ws.ViewState '--- Set ViewState ws.ViewState = Worksheet.SheetViewState.PageBreak {code} {example} {exceptions} {exception:ArgumentException} Attempting to set {{ViewState}} to {{PageLayout}} in an Excel 2003 or earlier workbook will throw an {{ArgumentException}}. {exception} {remarks} The viewing mode may be any of the values defined by [{{SheetViewState}}|Worksheet.SheetViewState]. By default, worksheets are in {{Normal}} mode. Note that only Excel 2007 or later workbooks support {{PageLayout}} mode. Setting this property to {{null}} will set the mode to {{Normal}}. {remarks} |
Page History
Overview
Content Tools