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)

[ChildElementInfoAttribute(typeof(Fills))]
[ChildElementInfoAttribute(typeof(NumberingFormats))]
[ChildElementInfoAttribute(typeof(Fonts))]
[ChildElementInfoAttribute(typeof(Colors))]
[ChildElementInfoAttribute(typeof(Borders))]
[ChildElementInfoAttribute(typeof(CellStyleFormats))]
[ChildElementInfoAttribute(typeof(CellFormats))]
[ChildElementInfoAttribute(typeof(CellStyles))]
[ChildElementInfoAttribute(typeof(StylesheetExtensionList))]
[ChildElementInfoAttribute(typeof(DifferentialFormats))]
[ChildElementInfoAttribute(typeof(TableStyles))]
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

Subclause

borders (Borders)

§18.8.5

cellStyles (Cell Styles)

§18.8.8

cellStyleXfs (Formatting Records)

§18.8.9

cellXfs (Cell Formats)

§18.8.10

colors (Colors)

§18.8.11

dxfs (Formats)

§18.8.15

extLst (Future Feature Data Storage Area)

§18.2.10

fills (Fills)

§18.8.21

fonts (Fonts)

§18.8.23

numFmts (Number Formats)

§18.8.31

tableStyles (Table Styles)

§18.8.42

[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.
Show: