CustomWorkbookView Class

Definition

Custom Workbook View.

This class is available in Office 2007 and above.

When the object is serialized out as xml, it's qualified name is x:customWorkbookView.

[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Spreadsheet.ExtensionList))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]
[DocumentFormat.OpenXml.SchemaAttr(22, "customWorkbookView")]
public class CustomWorkbookView : DocumentFormat.OpenXml.OpenXmlCompositeElement
public class CustomWorkbookView : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr(22, "customWorkbookView")]
public class CustomWorkbookView : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("x:customWorkbookView")]
public class CustomWorkbookView : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("x:customWorkbookView")]
public class CustomWorkbookView : DocumentFormat.OpenXml.TypedOpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Spreadsheet.ExtensionList))]
public class CustomWorkbookView : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Spreadsheet.ExtensionList))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]
public class CustomWorkbookView : DocumentFormat.OpenXml.OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Spreadsheet.ExtensionList))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]
[<DocumentFormat.OpenXml.SchemaAttr(22, "customWorkbookView")>]
type CustomWorkbookView = class
    inherit OpenXmlCompositeElement
type CustomWorkbookView = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr(22, "customWorkbookView")>]
type CustomWorkbookView = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("x:customWorkbookView")>]
type CustomWorkbookView = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("x:customWorkbookView")>]
type CustomWorkbookView = class
    inherit TypedOpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Spreadsheet.ExtensionList))>]
type CustomWorkbookView = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Spreadsheet.ExtensionList))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]
type CustomWorkbookView = class
    inherit OpenXmlCompositeElement
Public Class CustomWorkbookView
Inherits OpenXmlCompositeElement
Public Class CustomWorkbookView
Inherits TypedOpenXmlCompositeElement
Inheritance
Inheritance
Attributes

Remarks

[ISO/IEC 29500-1 1st Edition]

customWorkbookView (Custom Workbook View)

This element specifies a single custom workbook view. A custom workbook view consists of a set of display and print settings that you can name and apply to a workbook. You can create more than one custom workbook view of the same workbook. Custom Workbook Views are not required in order to construct a valid SpreadsheetML document, and are not necessary if the document is never displayed by a spreadsheet application, or if the spreadsheet application has a fixed display for workbooks. However, if a spreadsheet application chooses to implement configurable display modes, the customWorkbookView element should be used to persist the settings for those display modes. The settings fall into the following categories, and individual settings are detailed in the table following:

Window settings - these include size and positioning of the spreadsheet window as well as which window features should be displayed (scrollbars, sheet tabs, etc.).

Workbook content display and print settings - specifies whether features in the workbook should be included or ignored by a spreadsheet application when a custom workbook view is displayed or printed. [Example: Whether comments in the workbook should be displayed and how objects such as images should be displayed can be controlled by a Custom Workbook View. end example]

Persistence settings - these include settings that describe how a spreadsheet application should update persisted SpreadsheetML content if multiple spreadsheet applications are accessing a common instance of the SpreadsheetML document at the same time.

When a Custom Workbook View is present, there should also be corresponding customSheetView (§18.3.1.25) elements for each sheet (§18.2.19) in the workbook. The guid attribute of these customSheetView elements associates the customSheetView with the appropriate customWorkbookView. Attributes on the customWorkbookView element should be used to determine which settings within the Custom Sheet View should be respected by a spreadsheet application if the Custom Workbook View is displayed.

Parent Elements
customWorkbookViews (§18.2.4)
Child Elements Subclause
extLst (Future Feature Data Storage Area) §18.2.10
Attributes Description
activeSheetId (Active Sheet in Book View) Specifies the sheetId of a sheet in the workbook that identifies to a consuming application the default sheet to display. Corresponds to a sheetId of a sheet in the sheets collection.

This attribute is required.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.
autoUpdate (Auto Update) Specifies a boolean value that is an instruction that if the workbook is loaded by a spreadsheet application, that spreadsheet application should automatically update changes at the interval specified by the mergeInterval attribute. This is only applicable for shared workbooks (§18.11).

A value of 1 or true is an instruction to the spreadsheet application to update changes at the interval specified in the mergeInterval attribute.

A value of 0 or false is an instruction to the spreadsheet applicationto update changes whenever the spreadsheet application generates SpreadsheetML representing the workbook.

The default value for this attribute is false.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
changesSavedWin (Changes Saved Win) Specifies a boolean value that instructs a spreadsheet application to overwrite the persisted version of the document with the updated version being persisted. This is only applicable for shared workbooks in automatic update mode.

A value of 1 or true instructs a spreadsheet application to overwrite changes in the persisted version of a shared workbook when conflicts in data are found.

A value of 0 or false instructs a spreadsheet application to not overwrite changes in the persisted version of a shared workbook when conflicts are found.

The default value for this attribute is false.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
guid (Custom View GUID) Specifies a globally unique identifier (GUID) for this custom view

The possible values for this attribute are defined by the ST_Guid simple type (§22.9.2.4).
includeHiddenRowCol (Include Hidden Rows & Columns) Specifies a boolean value that indicates whether to include hidden rows, columns, and filter settings in this custom view.

A value of 1 or true indicates that hidden rows, columns, and filter settings are included in this custom view.

A value of 0 or false indicates that hidden rows, columns, and filter settings are not included.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
includePrintSettings (Include Print Settings) Specifies a boolean value that indicates whether to include print settings in this custom view.

A value of 1 or true indicates that print settings are included in this custom view.

A value of 0 or false indicates print settings are not included in this custom view.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
maximized (Maximized) Specifies a boolean value that indicates whether the workbook window is maximized.

A value of 1 or true indicates the workbook window is maximized.

A value of 0 or false indicates the workbook window is not maximized.

The default value for this attribute is false.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
mergeInterval (Merge Interval) Automatic update interval (in minutes). Only applicable for shared workbooks in automatic update mode.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.
minimized (Minimized) Specifies a boolean value that indicates whether the workbook window is minimized.

A value of 1 or true indicates the workbook window is minimized.

A value of 0 or false indicates the workbook window is not minimized.

The default value for this attribute is false.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
name (Custom View Name) Specifies the name of the custom view.

This attribute is required.

The possible values for this attribute are defined by the ST_Xstring simple type (§22.9.2.19).
onlySync (Only Synch) Specifies a boolean value that indicates, during automatic update, the current user's changes are not saved. The workbook is only updated with other users' changes. Only applicable for shared workbooks in automatic update mode.

A value of 1 or true indicates the current user's changes is not saved during automatic update.

A value of 0 or false indicates the current user's is saved during automatic update.

The default value for this attribute is false.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
personalView (Personal View) Specifies a boolean value that indicates that this custom view is a personal view for a shared workbook user. Only applicable for shared workbooks. Personal views allow each user of a shared workbook to store their individual print and filter settings.

A value of 1 or true indicates this custom view is a personal view for a shared workbook user.

A value of 0 or false indicates this view is not a personal view.

The default value for this attribute is false.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
showComments (Show Comments) Specifies how comments are displayed in this custom view

The possible values for this attribute are defined by the ST_Comments simple type (§18.18.14).
showFormulaBar (Show Formula Bar) Specifies a boolean value that indicates whether to display the formula bar in the application user interface.

A value of 1 or true indicates the formula bar is shown in the user interface.

A value of 0 or false indicates the formula bar is not shown in the user interface.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
showHorizontalScroll (Show Horizontal Scroll) Specifies a boolean value that indicates whether to display the horizontal scroll bar in the user interface.

A value of 1 or true indicates that the horizontal scrollbar is shown.

A value of 0 or false indicates that the horizontal scrollbar is not shown.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
showObjects (Show Objects) Specifies how objects are displayed in this custom view.

The default value for this attribute is "all."

The possible values for this attribute are defined by the ST_Objects simple type (§18.18.48).
showSheetTabs (Show Sheet Tabs) Specifies a boolean value that indicates whether to display the sheet tabs in the user interface.

A value of 1 or true indicates that sheet tabs shall be shown.

A value of 0 or false indicates that sheet tabs shall not be shown.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
showStatusbar (Show Status Bar) Specifies a boolean value that indicates whether to display the status bar in the user interface.

A value of 1 or true indicates that the status bar is shown.

A value of 0 or false indicates the status bar is not shown.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
showVerticalScroll (Show Vertical Scroll) Specifies a boolean value that indicates whether to display the vertical scroll bar.

A value of 1 or true indicates the vertical scrollbar shall be shown.

A value of 0 or false indicates the vertical scrollbar shall not be shown.

The default value for this attribute is true.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.
tabRatio (Sheet Tab Ratio) Specifies the ratio between the workbook tabs bar and the horizontal scroll bar. tabRatio is assumed to be out of 1000 of the horizontal window width.

The default value for this attribute is 600.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.
windowHeight (Window Height) Specifies the height of the workbook window. The unit of measurement for this value is twips.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.
windowWidth (Window Width) Specifies the width of the workbook window. The unit of measurement for this value is twips.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.
xWindow (Top Left Corner (X Coordinate)) Specifies the X coordinate for the upper left corner of the workbook window. The unit of measurement for this value is twips.

The possible values for this attribute are defined by the W3C XML Schema int datatype.
yWindow (Top Left Corner (Y Coordinate)) Specifies the Y coordinate for the upper left corner of the workbook window. The unit of measurement for this value is twips.

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

[Note: The W3C XML Schema definition of this element’s content model (CT_CustomWorkbookView) is located in §A.2. end note]

� ISO/IEC29500: 2008.

Constructors

CustomWorkbookView()

Initializes a new instance of the CustomWorkbookView class.

CustomWorkbookView(IEnumerable<OpenXmlElement>)

Initializes a new instance of the CustomWorkbookView class with the specified child elements.

CustomWorkbookView(OpenXmlElement[])

Initializes a new instance of the CustomWorkbookView class with the specified child elements.

CustomWorkbookView(String)

Initializes a new instance of the CustomWorkbookView class from outer XML.

Properties

ActiveSheetId

Active Sheet in Book View

Represents the following attribute in the schema: activeSheetId

AutoUpdate

Auto Update

Represents the following attribute in the schema: autoUpdate

ChangesSavedWin

Changes Saved Win

Represents the following attribute in the schema: changesSavedWin

ChildElements

Gets all the child nodes of the current element.

(Inherited from OpenXmlElement)
ExtendedAttributes

Gets all extended attributes (attributes not defined in the schema) of the current element.

(Inherited from OpenXmlElement)
ExtensionList

ExtensionList.

Represents the following element tag in the schema: x:extLst.

Features

Gets a IFeatureCollection for the current element. This feature collection will be read-only, but will inherit features from its parent part and package if available.

(Inherited from OpenXmlElement)
FirstChild

Gets the first child of the current OpenXmlElement element.

(Inherited from OpenXmlCompositeElement)
Guid

Custom View GUID

Represents the following attribute in the schema: guid

HasAttributes

Gets a value indicating whether the current element has any attributes.

(Inherited from OpenXmlElement)
HasChildren

Gets a value that indicates whether the current element has any child elements.

(Inherited from OpenXmlCompositeElement)
IncludeHiddenRowColumn

Include Hidden Rows and Columns

Represents the following attribute in the schema: includeHiddenRowCol

IncludePrintSettings

Include Print Settings

Represents the following attribute in the schema: includePrintSettings

InnerText

Gets or sets the concatenated values of the current node and all of its children.

(Inherited from OpenXmlCompositeElement)
InnerXml

Gets or sets the markup that represents only the child nodes of the current node.

(Inherited from OpenXmlCompositeElement)
LastChild

Gets the last child of the current OpenXmlElement element. Returns null (Nothing in Visual Basic) if there is no such OpenXmlElement element.

(Inherited from OpenXmlCompositeElement)
LocalName
LocalName

Gets the local name of the current element.

(Inherited from OpenXmlElement)
Maximized

Maximized

Represents the following attribute in the schema: maximized

MCAttributes

Gets or sets the markup compatibility attributes. Returns null if no markup compatibility attributes are defined for the current element.

(Inherited from OpenXmlElement)
MergeInterval

Merge Interval

Represents the following attribute in the schema: mergeInterval

Minimized

Minimized

Represents the following attribute in the schema: minimized

Name

Custom View Name

Represents the following attribute in the schema: name

NamespaceDeclarations

Gets all the namespace declarations defined in the current element. Returns an empty enumerator if there is no namespace declaration.

(Inherited from OpenXmlElement)
NamespaceUri

Gets the namespace URI of the current element.

(Inherited from OpenXmlElement)
OnlySync

Only Synch

Represents the following attribute in the schema: onlySync

OpenXmlElementContext

Gets the OpenXmlElementContext of the current element.

(Inherited from OpenXmlElement)
OuterXml

Gets the markup that represents the current element and all of its child elements.

(Inherited from OpenXmlElement)
Parent

Gets the parent element of the current element.

(Inherited from OpenXmlElement)
PersonalView

Personal View

Represents the following attribute in the schema: personalView

Prefix

Gets the namespace prefix of current element.

(Inherited from OpenXmlElement)
ShowComments

Show Comments

Represents the following attribute in the schema: showComments

ShowFormulaBar

Show Formula Bar

Represents the following attribute in the schema: showFormulaBar

ShowHorizontalScroll

Show Horizontal Scroll

Represents the following attribute in the schema: showHorizontalScroll

ShowObjects

Show Objects

Represents the following attribute in the schema: showObjects

ShowSheetTabs

Show Sheet Tabs

Represents the following attribute in the schema: showSheetTabs

ShowStatusbar

Show Status Bar

Represents the following attribute in the schema: showStatusbar

ShowVerticalScroll

Show Vertical Scroll

Represents the following attribute in the schema: showVerticalScroll

TabRatio

Sheet Tab Ratio

Represents the following attribute in the schema: tabRatio

WindowHeight

Window Height

Represents the following attribute in the schema: windowHeight

WindowWidth

Window Width

Represents the following attribute in the schema: windowWidth

XmlQualifiedName

Gets the qualified name of the current element.

(Inherited from OpenXmlElement)
XName

Gets the qualified name of the current element.

(Inherited from OpenXmlElement)
XWindow

Top Left Corner (X Coordinate)

Represents the following attribute in the schema: xWindow

YWindow

Top Left Corner (Y Coordinate)

Represents the following attribute in the schema: yWindow

Methods

AddAnnotation(Object)

Adds an object to the current OpenXmlElement element's list of annotations.

(Inherited from OpenXmlElement)
AddChild(OpenXmlElement, Boolean)

Adds the specified element to the element if it is a known child. This adds the element in the correct location according to the schema.

(Inherited from OpenXmlCompositeElement)
AddNamespaceDeclaration(String, String)

Adds a namespace declaration to the current node.

(Inherited from OpenXmlElement)
Ancestors()

Enumerates all of the current element's ancestors.

(Inherited from OpenXmlElement)
Ancestors<T>()

Enumerates only the current element's ancestors that have the specified type.

(Inherited from OpenXmlElement)
Annotation(Type)

Get the first annotation object of the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Annotation<T>()

Get the first annotation object of the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Annotations(Type)

Gets a collection of annotations with the specified type for the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Annotations<T>()

Gets a collection of annotations with the specified type for the current OpenXmlElement element.

(Inherited from OpenXmlElement)
Append(IEnumerable<OpenXmlElement>)

Appends each element from a list of elements to the end of the current element's list of child elements.

(Inherited from OpenXmlElement)
Append(OpenXmlElement[])

Appends each element from an array of elements to the end of the current element's list of child elements.

(Inherited from OpenXmlElement)
AppendChild<T>(T)

Appends the specified element to the end of the current element's list of child nodes.

(Inherited from OpenXmlCompositeElement)
ClearAllAttributes()

Clears all of the attributes, including both known attributes and extended attributes.

(Inherited from OpenXmlElement)
Clone()

Creates a duplicate of the current node.

(Inherited from OpenXmlElement)
CloneNode(Boolean)

Creates a duplicate of this node.

Descendants()

Enumerates all of the current element's descendants.

(Inherited from OpenXmlElement)
Descendants<T>()

Enumerate all of the current element's descendants of type T.

(Inherited from OpenXmlElement)
Elements()

Enumerates all of the current element's children.

(Inherited from OpenXmlElement)
Elements<T>()

Enumerates only the current element's children that have the specified type.

(Inherited from OpenXmlElement)
ElementsAfter()

Enumerates all of the sibling elements that follow the current element and have the same parent as the current element.

(Inherited from OpenXmlElement)
ElementsBefore()

Enumerates all of the sibling elements that precede the current element and have the same parent as the current element.

(Inherited from OpenXmlElement)
GetAttribute(String, String)

Gets an Open XML attribute with the specified tag name and namespace URI.

(Inherited from OpenXmlElement)
GetAttributes()

Gets a list that contains a copy of all the attributes.

(Inherited from OpenXmlElement)
GetEnumerator()

Returns an enumerator that iterates through the child collection.

(Inherited from OpenXmlElement)
GetFirstChild<T>()

Finds the first child element in type T.

(Inherited from OpenXmlElement)
InsertAfter<T>(T, OpenXmlElement)

Inserts the specified element immediately after the specified reference element.

(Inherited from OpenXmlCompositeElement)
InsertAfterSelf<T>(T)

Inserts the specified element immediately after the current element.

(Inherited from OpenXmlElement)
InsertAt<T>(T, Int32)

Inserts the specified element at the specified index of the current element's children.

(Inherited from OpenXmlCompositeElement)
InsertBefore<T>(T, OpenXmlElement)

Inserts the specified element immediately before the specified reference element.

(Inherited from OpenXmlCompositeElement)
InsertBeforeSelf<T>(T)

Inserts the specified element immediately before the current element.

(Inherited from OpenXmlElement)
IsAfter(OpenXmlElement)

Determines if the current element appears after a specified element in document order.

(Inherited from OpenXmlElement)
IsBefore(OpenXmlElement)

Determines if the current element appears before a specified element in document order.

(Inherited from OpenXmlElement)
LookupNamespace(String)

Resolves the namespace prefix in the context of the current node.

(Inherited from OpenXmlElement)
LookupPrefix(String)

Finds the corresponding prefix for a namespace uri in the current element scope.

(Inherited from OpenXmlElement)
NextSibling()

Gets the OpenXmlElement element that immediately follows the current OpenXmlElement element. Returns null (Nothing in Visual Basic) if there is no next OpenXmlElement element.

(Inherited from OpenXmlElement)
NextSibling<T>()

Gets the OpenXmlElement element with the specified type that follows the current OpenXmlElement element. Returns null (Nothing in Visual Basic) if there is no next OpenXmlElement.

(Inherited from OpenXmlElement)
PrependChild<T>(T)

Inserts the specified element at the beginning of the current element's list of child nodes.

(Inherited from OpenXmlCompositeElement)
PreviousSibling()

Gets the OpenXmlElement element that immediately precedes the current OpenXmlElement element. Returns null (Nothing in Visual Basic ) if there is no preceding OpenXmlElement element.

(Inherited from OpenXmlElement)
PreviousSibling<T>()

Gets the OpenXmlElement element with the specified type that precedes the current OpenXmlElement. Returns null (Nothing in Visual Basic) if there is no preceding OpenXmlElement element.

(Inherited from OpenXmlElement)
Remove()

Removes the current element from its parent.

(Inherited from OpenXmlElement)
RemoveAllChildren()

Removes all of the current element's child elements.

(Inherited from OpenXmlCompositeElement)
RemoveAllChildren<T>()

Remove all of the current element's child elements that are of type T.

(Inherited from OpenXmlElement)
RemoveAnnotations(Type)

Removes the annotations of the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
RemoveAnnotations<T>()

Removes the annotations with the specified type from the current OpenXmlElement element.

(Inherited from OpenXmlElement)
RemoveAttribute(String, String)

Removes the attribute from the current element.

(Inherited from OpenXmlElement)
RemoveChild<T>(T)

Removes the specified child element.

(Inherited from OpenXmlCompositeElement)
RemoveNamespaceDeclaration(String)

Removes the namespace declaration for the specified prefix. Removes nothing if there is no prefix.

(Inherited from OpenXmlElement)
ReplaceChild<T>(OpenXmlElement, T)

Replaces one of the current element's child elements with another OpenXmlElement element.

(Inherited from OpenXmlCompositeElement)
SetAttribute(OpenXmlAttribute)

Sets an attribute to the specified element. If the attribute is a known attribute, the value of the attribute is set. If the attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.

(Inherited from OpenXmlElement)
SetAttributes(IEnumerable<OpenXmlAttribute>)

Sets a number of attributes to the element. If an attribute is a known attribute, the value of the attribute is set. If an attribute is an extended attribute, the 'openxmlAttribute' is added to the extended attributes list.

(Inherited from OpenXmlElement)
WriteTo(XmlWriter)

Saves the current node to the specified XmlWriter.

(Inherited from OpenXmlElement)

Explicit Interface Implementations

IEnumerable.GetEnumerator() (Inherited from OpenXmlElement)
IEnumerable<OpenXmlElement>.GetEnumerator()

Returns an enumerator that iterates through the child collection.

(Inherited from OpenXmlElement)

Applies to