Class ExcelWorksheetView¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Represents the different view states of the worksheet
Inheritance¶
object ← XmlHelper ← ExcelWorksheetView
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
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
Property Value¶
BottomLeftPane¶
The bottom left pane. This property returns null if the pane does not exist in the Panes array.
Property Value¶
ExcelWorksheetView.ExcelWorksheetPanes
BottomRightPane¶
The bottom right pane. This property returns null if the pane does not exist in the Panes array.
Property Value¶
ExcelWorksheetView.ExcelWorksheetPanes
PageBreakView¶
Sets the view mode of the worksheet to pagebreak
Property Value¶
PageLayoutView¶
Sets the view mode of the worksheet to pagelayout
Property Value¶
PaneSettings¶
Contains settings for the active pane
Property Value¶
ExcelWorksheetView.ExcelWorksheetViewPaneSettings
Panes¶
Reference to the panes
Property Value¶
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'.
Property Value¶
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).
Property Value¶
SheetViewElement¶
Returns a reference to the sheetView element
Property Value¶
XmlElement
ShowGridLines¶
Show gridlines in the worksheet
Property Value¶
ShowHeaders¶
Show the Column/Row headers (containg column letters and row numbers)
Property Value¶
TabSelected¶
If the worksheet is selected within the workbook. NOTE: Setter clears other selected tabs.
Property Value¶
TabSelectedMulti¶
If the worksheet is selected within the workbook. NOTE: Setter keeps other selected tabs.
Property Value¶
TopLeftCell¶
The Top-Left Cell visible. Single cell address. Empty string or null is the same as A1.
Property Value¶
TopLeftPane¶
The top left pane or the top pane if the sheet is horizontaly split. This property returns null if the pane does not exist in the Panes array.
Property Value¶
ExcelWorksheetView.ExcelWorksheetPanes
TopRightPane¶
The top right pane. This property returns null if the pane does not exist in the Panes array.
Property Value¶
ExcelWorksheetView.ExcelWorksheetPanes
ZoomScale¶
Window zoom magnification for current view representing percent values.
Property Value¶
Methods¶
FreezePanes(int, int)¶
Freeze the columns and rows starting from TopLeftCell
Note that if the
(Row - hiddenRows == 1 && Column - hiddenCols == 1)
UnFreezePanes() is called instead
Parameters¶
Row int
Rows from the TopLeftCell. Starts from 1
Column int
Columns from the TopLeftCell. Starts from 1
SetTabSelected(bool, bool)¶
Sets whether the worksheet is selected within the workbook.
Parameters¶
isSelected bool
Whether the tab is selected, defaults to true.
allowMultiple bool
Whether to allow multiple active tabs, defaults to false.
SplitPanes(int, int)¶
Split the window at the supplied row/column. The split is performed using the current width/height of the visible rows and columns, so any changes to column width or row heights after the split will not effect the split position. To remove split call this method with zero as value of both paramerters or use UnFreezePanes
Parameters¶
rowsTop int
Splits the panes at the coordinate after this visible row. Zero mean no split on row level
columnsLeft int
Splits the panes at the coordinate after this visible column. Zero means no split on column level.
SplitPanesPixels(int, int)¶
Split panes at the position in pixels from the top-left corner.
Parameters¶
pixelsY int
Vertical pixels
pixelsX int
Horizontal pixels
UnFreezePanes()¶
Unlock all rows and columns to scroll freely