SheetView Class
Worksheet View.When the object is serialized out as xml, its qualified name is x:sheetView.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Spreadsheet.SheetView
Namespace: DocumentFormat.OpenXml.Spreadsheet
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<ChildElementInfoAttribute(GetType(Pane))> _
<ChildElementInfoAttribute(GetType(Selection))> _
<ChildElementInfoAttribute(GetType(PivotSelection))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
Public Class SheetView _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As SheetView
[ChildElementInfoAttribute(typeof(Pane))]
[ChildElementInfoAttribute(typeof(Selection))]
[ChildElementInfoAttribute(typeof(PivotSelection))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
public class SheetView : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
Pane <x:pane>
Selection <x:selection>
PivotSelection <x:pivotSelection>
ExtensionList <x:extLst>
[ISO/IEC 29500-1 1st Edition]
18.3.1.87 sheetView (Worksheet View)
A single sheet view definition. When more than one sheet view is defined in the file, it means that when opening the workbook, each sheet view corresponds to a separate window within the spreadsheet application, where each window is showing the particular sheet containing the same workbookViewId value, the last sheetView definition is loaded, and the others are discarded. When multiple windows are viewing the same sheet, multiple sheetView elements (with corresponding workbookView entries) are saved.
Parent Elements |
---|
sheetViews (§18.3.1.88) |
Child Elements |
Subclause |
---|---|
extLst (Future Feature Data Storage Area) |
§18.2.10 |
pane (View Pane) |
§18.3.1.66 |
pivotSelection (PivotTable Selection) |
§18.3.1.69 |
selection (Selection) |
§18.3.1.78 |
Attributes |
Description |
---|---|
colorId (Color Id) |
Index to the color value for row/column text headings and gridlines. This is an 'index color value' (ICV) rather than rgb value. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
defaultGridColor (Default Grid Color) |
Flag indicating that the consuming application should use the default grid lines color (system dependent). Overrides any color specified in colorId. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
rightToLeft (Right To Left) |
Flag indicating whether the sheet is in 'right to left' display mode. When in this mode, Column A is on the far right, Column B ;is one column left of Column A, and so on. Also, information in cells is displayed in the Right to Left format. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showFormulas (Show Formulas) |
Flag indicating whether this sheet should display formulas. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showGridLines (Show Grid Lines) |
Flag indicating whether this sheet should display gridlines. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showOutlineSymbols (Show Outline Symbols) |
Flag indicating whether the sheet has outline symbols visible. This flag shall always override SheetPr element's outlinePr child element whose attribute is named showOutlineSymbols when there is a conflict. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showRowColHeaders (Show Headers) |
Flag indicating whether the sheet should display row and column headings. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showRuler (Show Ruler) |
Show the ruler in Page Layout View. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showWhiteSpace (Show White Space) |
Flag indicating whether page layout view shall display margins. False means do not display left, right, top (header), and bottom (footer) margins (even when there is data in the header or footer). The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
showZeros (Show Zero Values) |
Flag indicating whether the window should show 0 (zero) in cells containing zero value. When false, cells with zero value appear blank instead of showing the number zero. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
tabSelected (Sheet Tab Selected) |
Flag indicating whether this sheet is selected. When only 1 sheet is selected and active, this value should be in synch with the activeTab value. In case of a conflict, the Start Part setting wins and sets the active sheet tab. Multiple sheets can be selected, but only one sheet shall be active at one time. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
topLeftCell (Top Left Visible Cell) |
Location of the top left visible cell Location of the top left visible cell in the bottom right pane (when in Left-to-Right mode). The possible values for this attribute are defined by the ST_CellRef simple type (§18.18.7). |
view (View Type) |
Indicates the view type. The possible values for this attribute are defined by the ST_SheetViewType simple type (§18.18.69). |
windowProtection (Window Protection) |
Flag indicating whether the panes in the window are locked due to workbook protection. This is an option when the workbook structure is protected. The possible values for this attribute are defined by the W3C XML Schema boolean datatype. |
workbookViewId (Workbook View Index) |
Zero-based index of this workbook view, pointing to a workbookView element in the bookViews collection. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
zoomScale (Zoom Scale) |
Window zoom magnification for current view representing percent values. This attribute is restricted to values ranging from 10 to 400. Horizontal & Vertical scale together. [Example: 10 - 10% 20 - 20% … 100 - 100% … 400 - 400% end example] Current view can be Normal, Page Layout, or Page Break Preview. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
zoomScaleNormal (Zoom Scale Normal View) |
Zoom magnification to use when in normal view, representing percent values. This attribute is restricted to values ranging from 10 to 400. Horizontal & Vertical scale together. [Example: 10 - 10% 20 - 20% … 100 - 100% … 400 - 400% end example] Applies for worksheets only; zero implies the automatic setting. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
zoomScalePageLayoutView (Zoom Scale Page Layout View) |
Zoom magnification to use when in page layout view, representing percent values. This attribute is restricted to values ranging from 10 to 400. Horizontal & Vertical scale together. [Example: 10 - 10% 20 - 20% … 100 - 100% … 400 - 400% end example] Applies for worksheets only; zero implies the automatic setting. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
zoomScaleSheetLayoutView (Zoom Scale Page Break Preview) |
Zoom magnification to use when in page break preview, representing percent values. This attribute is restricted to values ranging from 10 to 400. Horizontal & Vertical scale together. [Example: 10 - 10% 20 - 20% … 100 - 100% … 400 - 400% end example] Applies for worksheet only; zero implies the automatic setting. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. |
[Note: The W3C XML Schema definition of this element’s content model (CT_SheetView) is located in §A.2. end note]
© ISO/IEC29500: 2008.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.