WorkbookProperties Class

Workbook Properties.When the object is serialized out as xml, its qualified name is x:workbookPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Spreadsheet.WorkbookProperties

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

Syntax

'Declaration
Public Class WorkbookProperties _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As WorkbookProperties
public class WorkbookProperties : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

18.2.28 workbookPr (Workbook Properties)

This element defines a collection of workbook properties.

[Example:

<workbookPr dateCompatibility="false" showObjects="none" saveExternalLinkValues="0"
defaultThemeVersion="123820"/>

end example]

Parent Elements

workbook (§18.2.27)

Attributes

Description

allowRefreshQuery (Allow Refresh Query)

Specifies a boolean value that indicates whether the application will refresh query tables in this workbook.

A value of 1 or true indicates the application will refresh query tables when the workbook is loaded.

A value of 0 or false indicates the application will not refresh query tables.

The default value for this attribute is false.

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

autoCompressPictures (Auto Compress Pictures)

Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.

A value of 1 or true indicates the application automatically compresses pictures of the workbook. When a picture is compressed, the application:

  • Reduces resolution (to 96 dots per inch (dpi) for Web and 200 dpi for print), and unnecessary information is discarded.

  • Discards extra information. [Example: When a picture has been cropped or resized, the "hidden" parts of the picture are stored in the file. end example]

  • Compress the picture, if possible.

A value of 0 or false indicates the application does not compress pictures in this workbook.

The default value for this attribute is true.

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

backupFile (Create Backup File)

Specifies a boolean value that indicates whether the application creates a backup of the workbook on save.

A value of 1 or true indicates the application creates a backup of the workbook on save.

A value of 0 or false indicates the application does not create a backup.

The default value for this attribute is false.

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

checkCompatibility (Check Compatibility On Save)

Specifies a boolean value that indicates whether the application checks for compatibility when saving this workbook to older file formats.

A value of 1 or true indicates the application performs a compatibility check when saving to legacy binary formats.

A value of 0 or false indicates the application does not perform a compatibility check when saving to legacy binary formats.

The default value for this attribute is false.

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

codeName (Code Name)

Specifies the codename of the application that created this workbook. Use this attribute to track file content in incremental releases of the application.

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

date1904 (Date 1904)

Value that indicates whether to use a 1900 or 1904 date base when converting serial values in the workbook to dates. [Note: If the dateCompatibility attribute is 0 or false, this attribute is ignored. end note]

A value of 1 or true indicates the workbook uses the 1904 backward compatibility date system.

A value of 0 or false indicates the workbook uses a date system based in 1900, as specified by the value of the dateCompatibility attribute.

(See §18.17.4.1 for the definition of the date bases.)

The default value for this attribute is false.

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

dateCompatibility (Date Compatibility)

Specifies whether the date base should be treated as a compatibility date base or should support the full ISO 8601 date range.

A value of 1 or true indicates that the date system in use is either the 1900 backward compatibility date base or the 1904 backward compatibility date base, as specified by the value of the date1904 attribute.

A value of 0 or false indicates that the date system is the 1900 date base, based on the ISO 8601 date range.

(See §18.17.4.1 for the definition of the date bases.)

The default value for this attribute is true.

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

defaultThemeVersion (Default Theme Version)

Specifies the default version of themes to apply in the workbook.

The value for defaultThemeVersion depends on the application. SpreadsheetML defaults to the form [version][build], where [version] refers to the version of the application, and [build] refers to the build of the application when the themes in the user interface changed.

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

filterPrivacy (Filter Privacy)

Specifies a boolean value that indicates whether the application has inspected the workbook for personally identifying information (PII). If this flag is set, the application warns the user any time the user performs an action that will insert PII into the document. [Example: Inserting a comment might insert the user's name. end example]

A value of 1 or true indicates the application will warn the user when they insert PII into the workbook.

A value of 0 or false indicates the application will not warn the user when they insert PII into the workbook; the workbook has not been inspected for PII.

The default value for this attribute is false.

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

hidePivotFieldList (Hide Pivot Field List)

Specifies a boolean value that indicates whether a list of fields is shown for pivot tables in the application user interface.

A value of 1 or true indicates a list of fields is show for pivot tables.

A value of 0 or false indicates a list of fields is not shown for pivot tables.

The default value for this attribute is false.

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

promptedSolutions (Prompted Solutions)

Specifies a boolean value that indicates whether the user has received an alert to load Smart Document components.

A value of 1 or true indicates the user received an alert to load SmartDoc.

A value of 0 or false indicates the user did not receive an alert.

The default value for this attribute is false.

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

publishItems (Publish Items)

Specifies a boolean value that indicates whether the publish the workbook or workbook items to the application server.

A value of 1 or true indicates that workbook items are published.

A value of 0 or false indicates that the workbook is published.

The default value for this attribute is false.

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

refreshAllConnections (Refresh all Connections on Open)

Specifies a boolean value that indicates whether the workbok shall refresh all the connections to data sources during load.

The default value for this attribute is false.

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

saveExternalLinkValues (Save External Link Values)

Specifies a boolean value that indicates whether the application will cache values retrieved from other workbooks via an externally linking formula. Data is cached at save.

A value of 1 or true indicates data from externally linked formulas is cached. A supporting part is written out containing a cached cell table from the external workbook.

A value of 0 or false indicates data from externally linked formulas is not cached.

The default value for this attribute is true.

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

showBorderUnselectedTables (Show Border Unselected Table)

Specifies a boolean value that indicates whether a border is drawn around unselected tables in the workbook.

A value of 1 or true indicates borders are drawn around unselected tables.

A value of 0 or false indicates borders are not drawn around unselected tables.

The default value for this attribute is true.

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

showInkAnnotation (Show Ink Annotations)

Specifies a boolean value that indicates whether the book shows ink annotations.

A value of 1 or true indicates that ink annotations are shown in the workbook.

A value of 0 or false indicates that ink annotations are not shown in the workbook.

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 the application shows embedded objects in the workbook.

This attribute it optional.

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

showPivotChartFilter (Show Pivot Chart Filter)

Specifies a boolean value that indicates whether filtering options are shown for pivot charts in the workbook.

A value of 1 or true indicates filtering options shall be shown for pivot charts.

A value of 0 or false indicates filtering options shall not be shown.

The default value for this attribute is false.

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

updateLinks (Update Links Behavior)

Specifies how the application updates external links when the workbook is opened.

The default value for this attribute is userSet.

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

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

WorkbookProperties Members

DocumentFormat.OpenXml.Spreadsheet Namespace