Fills Class

Fills.When the object is serialized out as xml, its qualified name is x:fills.

Inheritance Hierarchy


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


<ChildElementInfoAttribute(GetType(Fill))> _
Public Class Fills _
    Inherits OpenXmlCompositeElement
Dim instance As Fills
public class Fills : OpenXmlCompositeElement


The following table lists the possible child types:

  • Fill <x:fill>

[ISO/IEC 29500-1 1st Edition]

18.8.21 fills (Fills)

This element defines the cell fills portion of the Styles part, consisting of a sequence of fill records. A cell fill consists of a background color, foreground color, and pattern to be applied across the cell.

[Example:This cell has a yellow fill:


This is the corresponding XML:

<patternFill patternType="solid">
<fgColor rgb="FFFFFF00"/>
<bgColor indexed="64"/>

This cell has a yellow fill with a thin horizontal crosshatch pattern applied (patternType = lightGrid):


This is the corresponding XML:

<patternFill patternType="lightGrid">
<bgColor rgb="FFFFFF00"/>

end example]

Parent Elements

styleSheet (§18.8.39)

Child Elements


fill (Fill)




count (Fill Count)

Count of fill elements.

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

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


Fills Members

DocumentFormat.OpenXml.Spreadsheet Namespace