Show / Hide Table of Contents

Class ExcelWorksheetView

Represents the different view states of the worksheet

Inheritance
System.Object
XmlHelper
ExcelWorksheetView
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public class ExcelWorksheetView : XmlHelper

Properties

ActiveCell

The active cell. Single cell address.
This cell must be inside the selected range. If not, the selected range is set to the active cell address

Declaration
public string ActiveCell { get; set; }
Property Value
Type Description
System.String

PageBreakView

Sets the view mode of the worksheet to pagebreak

Declaration
public bool PageBreakView { get; set; }
Property Value
Type Description
System.Boolean

PageLayoutView

Sets the view mode of the worksheet to pagelayout

Declaration
public bool PageLayoutView { get; set; }
Property Value
Type Description
System.Boolean

Panes

Reference to the panes

Declaration
public ExcelWorksheetView.ExcelWorksheetPanes[] Panes { get; }
Property Value
Type Description
ExcelWorksheetView.ExcelWorksheetPanes[]

RightToLeft

If the sheet is in 'right to left' display mode. Column A is on the far right and column B to the left of A. Text is also 'right to left'.

Declaration
public bool RightToLeft { get; set; }
Property Value
Type Description
System.Boolean

SelectedRange

Selected Cells in the worksheet. Used in combination with ActiveCell. If the active cell is not inside the selected range, the active cell will be set to the first cell in the selected range. If the selected range has multiple adresses, these are separated with space. If the active cell is not within the first address in this list, the attribute ActiveCellId must be set (not supported, so it must be set via the XML).

Declaration
public string SelectedRange { get; set; }
Property Value
Type Description
System.String

SheetViewElement

Returns a reference to the sheetView element

Declaration
protected XmlElement SheetViewElement { get; }
Property Value
Type Description
System.Xml.XmlElement

ShowGridLines

Show gridlines in the worksheet

Declaration
public bool ShowGridLines { get; set; }
Property Value
Type Description
System.Boolean

ShowHeaders

Show the Column/Row headers (containg column letters and row numbers)

Declaration
public bool ShowHeaders { get; set; }
Property Value
Type Description
System.Boolean

TabSelected

If the worksheet is selected within the workbook. NOTE: Setter clears other selected tabs.

Declaration
public bool TabSelected { get; set; }
Property Value
Type Description
System.Boolean

TabSelectedMulti

If the worksheet is selected within the workbook. NOTE: Setter keeps other selected tabs.

Declaration
public bool TabSelectedMulti { get; set; }
Property Value
Type Description
System.Boolean

TopLeftCell

The Top-Left Cell visible. Single cell address. Empty string or null is the same as A1.

Declaration
public string TopLeftCell { get; set; }
Property Value
Type Description
System.String

ZoomScale

Window zoom magnification for current view representing percent values.

Declaration
public int ZoomScale { get; set; }
Property Value
Type Description
System.Int32

Methods

FreezePanes(Int32, Int32)

Freeze the columns/rows to left and above the cell

Declaration
public void FreezePanes(int Row, int Column)
Parameters
Type Name Description
System.Int32 Row
System.Int32 Column

SetTabSelected(Boolean, Boolean)

Sets whether the worksheet is selected within the workbook.

Declaration
public void SetTabSelected(bool isSelected = true, bool allowMultiple = false)
Parameters
Type Name Description
System.Boolean isSelected

Whether the tab is selected, defaults to true.

System.Boolean allowMultiple

Whether to allow multiple active tabs, defaults to false.

UnFreezePanes()

Unlock all rows and columns to scroll freely

Declaration
public void UnFreezePanes()
Back to top Generated by DocFX