CustomSheetView Class

Custom Sheet View.When the object is serialized out as xml, its qualified name is x:customSheetView.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.CustomSheetView

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(PageSetup))> _
<ChildElementInfoAttribute(GetType(PrintOptions))> _
<ChildElementInfoAttribute(GetType(PageMargins))> _
<ChildElementInfoAttribute(GetType(Selection))> _
<ChildElementInfoAttribute(GetType(RowBreaks))> _
<ChildElementInfoAttribute(GetType(ColumnBreaks))> _
<ChildElementInfoAttribute(GetType(HeaderFooter))> _
<ChildElementInfoAttribute(GetType(Pane))> _
<ChildElementInfoAttribute(GetType(AutoFilter))> _
Public Class CustomSheetView _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As CustomSheetView
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(PageSetup))]
[ChildElementInfoAttribute(typeof(PrintOptions))]
[ChildElementInfoAttribute(typeof(PageMargins))]
[ChildElementInfoAttribute(typeof(Selection))]
[ChildElementInfoAttribute(typeof(RowBreaks))]
[ChildElementInfoAttribute(typeof(ColumnBreaks))]
[ChildElementInfoAttribute(typeof(HeaderFooter))]
[ChildElementInfoAttribute(typeof(Pane))]
[ChildElementInfoAttribute(typeof(AutoFilter))]
public class CustomSheetView : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • Pane <x:pane>

  • Selection <x:selection>

  • RowBreaks <x:rowBreaks>

  • ColumnBreaks <x:colBreaks>

  • PageMargins <x:pageMargins>

  • PrintOptions <x:printOptions>

  • PageSetup <x:pageSetup>

  • HeaderFooter <x:headerFooter>

  • AutoFilter <x:autoFilter>

  • ExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition]

18.3.1.25 customSheetView (Custom Sheet View)

This collection stores information pertaining to one custom sheet view definition. A custom view is a collection of settings defining a particular view of the sheet. These views can be selected by the user for quick access to predefined views of the sheet.

[Example:This example indicates that there is both a horizontal and vertical split in the sheet view, and that the top left cell of the bottom right pane is F7. Page margin, print options, page setup, and header / footer information is also stored with this view.

<customSheetView guid="{F3A061A9-D5FD-4F9C-A7CD-483AD476BA25}"
sizeWithWindow="0">
<pane xSplit="5" ySplit="6" topLeftCell="F7"/>
  <selection/>
  <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3"
footer="0.3"/>
  <printOptions gridLinesSet="0"/>
  <pageSetup paperSize="0" scale="0" orientation="portrait" printDriver="0"
horizontalDpi="0" verticalDpi="0" copies="0"/>
  <headerFooter/>
</customSheetView>

end example]

Parent Elements

customSheetViews (§18.3.1.27)

Child Elements

Subclause

autoFilter (AutoFilter Settings)

§18.3.1.2

colBreaks (Vertical Page Breaks)

§18.3.1.14

extLst (Future Feature Data Storage Area)

§18.2.10

headerFooter (Header Footer Settings)

§18.3.1.46

pageMargins (Page Margins)

§18.3.1.62

pageSetup (Page Setup Settings)

§18.3.1.63

pane (View Pane)

§18.3.1.66

printOptions (Print Options)

§18.3.1.70

rowBreaks (Horizontal Page Breaks (Row))

§18.3.1.74

selection (Selection)

§18.3.1.78

Attributes

Description

colorId (Color Id)

Index to the color value for the text in row/column headings and gridlines for this custom view. 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.

filter (Filtered List)

Flag indicating whether the view contains a filtered range.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

filterUnique (Filter)

Indicates whether an advanced filter has been applied, and the option to filter out duplicate records from the data list has been selected, in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

fitToPage (Fit To Page)

Flag indicating whether this view should be fit to page when printing this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

guid (GUID)

Unique identifier of this custom view. This is used to ensure uniqueness. It is generated when the view is created. Shall correspond to a customWorkbookView guid value in the workbook Start Part.

The possible values for this attribute are defined by the ST_Guid simple type (§22.9.2.4).

hiddenColumns (Hidden Columns)

Flag indicating that there is one or more hidden column(s) in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

hiddenRows (Hidden Rows)

Flag indicating that there is one or more hidden row(s) in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

outlineSymbols (Show Outline Symbols)

Flag indicating whether outline symbols are displayed in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

printArea (Print Area Defined)

Flag indicating whether a print area is defined as part of this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

scale (Print Scale)

Print scaling for this custom view. The values of this attribute shall be restricted to the range from 10 to 400.

[Example:

10 - 10%

20 - 20%

100 - 100%

400 - 400%

end example]

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

showAutoFilter (Show AutoFitler Drop Down Controls)

Flag indicating whether the autofilter dropdown buttons are visible in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

showFormulas (Show Formulas)

Flag indicating whether formulas are shown in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

showGridLines (Show Grid Lines)

Flag indicating whether gridlines are shown in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

showPageBreaks (Show Page Breaks)

Flag indicating whether page breaks are shown in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

showRowCol (Show Headers)

Flag indicating whether row and column headers are shown in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

showRuler (Show Ruler)

Flag indicating whether to show the ruler in this custom view. Only applicable if this Custom View is in Page Layout View.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

state (Visible State)

Visibility state for this custom view.

The possible values for this attribute are defined by the ST_SheetState simple type (§18.18.68).

topLeftCell (Top Left Visible Cell)

Location of the top left visible cell in the bottom right pane in this custom view (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 for this Custom View

The possible values for this attribute are defined by the ST_SheetViewType simple type (§18.18.69).

zeroValues (Show Zero Values)

Flag indicating whether the window should display 0 (zero) values in this custom view.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_CustomSheetView) 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.

See Also

Reference

CustomSheetView Members

DocumentFormat.OpenXml.Spreadsheet Namespace