XmlProperties Class

Column XML Properties.When the object is serialized out as xml, its qualified name is x:xmlPr.

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

public class XmlProperties : OpenXmlCompositeElement

The following table lists the possible child types:

  • ExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition] xmlPr (Column XML Properties)

This element represents the column properties for single cell XML tables.

Parent Elements

xmlCellPr (§

Child Elements


extLst (Future Feature Data Storage Area)




mapId (XML Map Id)

An integer representing the ID of the XML map this table field is associated with.

The XML map is defined in the xml maps part, and the Map element should have the corresponding id.

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

xmlDataType (XML Data Type)

An enumeration indicating which XML data type is used by this column.

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

xpath (XPath)

A string representing the XML path to the element this column is associated with.

The spreadsheet application should support XPath limited to the following:

  • The XPath is an absolute path to a simple-content element or attribute


"/ns1:root/ns1:row/ns1:column1" is supported if 'column1' is a child-most node, but not "/ns1:root/ns1:row" for the same document since 'row' is not a child.

end example]

  • The XPath does not express axes, but uses the default child axes


"/ns1:root/ns1:row" is supported but not "/ns1:root/child::ns1:row

end example]

  • An optional filter can be expressed at the end of the xpath


"/ns1:root/ns1:row/ns1:column1[@foo='abc']" is supported but not "/ns1:root/ns1:row[@foo='abc']/ns1:column1"

end example]

  • The filter can only contain a single expression comparing a named attribute to a specific value

  • Filters are only supported on XPaths that resolve to a simple-content element (not attributes)

  • The named attribute shall be defined as an attribute of the simple-content element

  • The attribute name shall be preceded by the short-hand (@) symbol representing the axes 'attribute'


"/ns1:root/ns1:row/ns1:column1[@foo='abc']" is supported not "/ns1:root/ns1:row/ns1:column1[attribute::foo='abc']"

end example]

  • An arbitrary amount of white-space can be embedded between filter tokens


"/ns1:root/ns1:row/ns1:column1[ @ foo='abc']" is permitted

end example]

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