Stylesheet Class

Style Sheet. It is the root element of WorkbookStylesPart.When the object is serialized out as xml, its qualified name is x:styleSheet.

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

public class Stylesheet : OpenXmlPartRootElement

The following table lists the possible child types:

  • NumberingFormats <x:numFmts>

  • Fonts <x:fonts>

  • Fills <x:fills>

  • Borders <x:borders>

  • CellStyleFormats <x:cellStyleXfs>

  • CellFormats <x:cellXfs>

  • CellStyles <x:cellStyles>

  • DifferentialFormats <x:dxfs>

  • TableStyles <x:tableStyles>

  • Colors <x:colors>

  • StylesheetExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition]

18.8.39 styleSheet (Style Sheet)

This is the root element of the Styles part.

Parent Elements

Root element of SpreadsheetML Styles part

Child Elements


borders (Borders)


cellStyles (Cell Styles)


cellStyleXfs (Formatting Records)


cellXfs (Cell Formats)


colors (Colors)


dxfs (Formats)


extLst (Future Feature Data Storage Area)


fills (Fills)


fonts (Fonts)


numFmts (Number Formats)


tableStyles (Table Styles)


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