This documentation is archived and is not being maintained.

CustomWorkbookView Class

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

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

[ChildElementInfoAttribute(typeof(ExtensionList))]
public class CustomWorkbookView : OpenXmlCompositeElement

The following table lists the possible child types:

  • ExtensionList <x:extLst>


[ISO/IEC 29500-1 1st Edition]

18.2.3 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: