Headers Class

Revision Headers. It is the root element of WorkbookRevisionHeaderPart.When the object is serialized out as xml, its qualified name is x:headers.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.OpenXmlPartRootElement
        DocumentFormat.OpenXml.Spreadsheet.Headers

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Header))> _
Public Class Headers _
    Inherits OpenXmlPartRootElement
'Usage
Dim instance As Headers
[ChildElementInfoAttribute(typeof(Header))]
public class Headers : OpenXmlPartRootElement

Remarks

The following table lists the possible child types:

  • Header <x:header>

[ISO/IEC 29500-1 1st Edition]

18.11.1.2 headers (Revision Headers)

This element represents the list of revision headers.

This section contains many references to history, versions, and revisions, and it is helpful to clarify the relationships here. In general, a series of changes (revisions) can be made to a spreadsheet. When a batch of those revisions is saved to disk, the version number of the spreadsheet is incremented. The batch of changes is saved to the revision history, which is persisted on disk with the file in the form of different log files and headers.

There are some attributes that deal with history which might seem redundant (such as diskRevisions, and history, among others) - these are there for backwards compatibility with older versions of spreadsheet applications and do not need to be used for creating new files.

Child Elements

Subclause

header (Header)

§18.11.1.1

Attributes

Description

diskRevisions (Disk Revisions)

A Boolean value indicating that this shared workbook file contains revisions. True when the workbook does have revisions, false otherwise.

[Note: this attribute is used for backwards compatibility. end note]

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

exclusive (Exclusive Mode)

A Boolean value indicating that this shared workbook is in exclusive mode.

A workbook is in exclusive mode when a user has a lock on it for appending revisions to the file.

[Note: This is used for backwards compatibility with older spreadsheet applications. end note]

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

guid (Last Revision GUID)

The globally unique identifier of the last set of revisions. This shall match the GUID for the most recent header.

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

history (History)

A Boolean value indicating that this shared workbook maintains a revision history. True if a history is maintained, false otherwise.

[Note: This is used for backwards compatibility with older spreadsheet applications. end note]

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

keepChangeHistory (Keep Change History)

A Boolean value indicating whether the revision history should be kept for this shared workbook. True if the history should be kept, false otherwise.

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

lastGuid (Last GUID)

Unique identifier of the last set of revisions that was saved into the file.

The spreadsheet application can have certain modes, such as a timed save mode, where the application doesn't do a full save, but instead just appends the most recent revision records. In cases like this, for a new user that opens such a file while it is being edited, the file that was loaded from disk only have the changes that were saved during a full save. To get the current state of the file which includes edits by other users, the spreadsheet application would need to apply all the revisions from lastGuid to guid.

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

preserveHistory (Preserve History)

An integer representing the number of days the spreadsheet application shall keep the change history for this workbook.

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

protected (Protected)

A Boolean value indicating whether the change tracking in this shared workbook can be removed. True if the tracking can be removed, false otherwise.

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

revisionId (Revision Id)

The current revision number of this shared workbook.

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

shared (Shared Workbook)

A Boolean value indicating that this workbook is shared. True when the workbook is shared, false otherwise.

[Note: This is used for backwards compatibility with older spreadsheet applications. end note]

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

trackRevisions (Track Revisions)

A Boolean value indicating that revisions are tracked in this shared workbook. True when revisions are tracked, false otherwise.

[Note: This is used for backwards compatibility with older spreadsheet applications. end note]

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

version (Version)

An integer representing the current version of this shared workbook. The integer should begin counting from 1 for the first version.

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

Headers Members

DocumentFormat.OpenXml.Spreadsheet Namespace