CustomProperty Class

Custom Property.When the object is serialized out as xml, its qualified name is x:customPr.

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

public class CustomProperty : OpenXmlLeafElement

[ISO/IEC 29500-1 1st Edition] customPr (Custom Property)

The custom property element provides a mechanism to store name/value pairs of arbitrary user-defined data. The name is stored in the attribute name, the arbitrary data is stored in the binary part referenced by the relationshipId.

[Note: There is nothing in the binary part except the arbitrary data itself.

Custom XML Data Properties provide a preferred mechanism for storing arbitrary data. The customPr supports legacy third-party document components, as well as those situations that have a stringent need for binary parts. end note]

Parent Elements

customProperties (§



id (Relationship Id)

Namespace: .../officeDocument/2006/relationships

This relationship references the binary part containing the specified custom properties.

The possible values for this attribute are defined by the ST_RelationshipId simple type (§

name (Custom Property Name)

Name of the custom property

The possible values for this attribute are defined by the ST_Xstring simple type (§

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

Community Additions