Show / Hide Table of Contents

Class ExcelStyles

Containts all shared cell styles for a workbook

Inheritance
System.Object
XmlHelper
ExcelStyles
Inherited Members
XmlHelper.AddSchemaNodeOrder(String[], String[])
XmlHelper.AddSchemaNodeOrder(String[], String[], Int32[])
XmlHelper.GetBoolFromString(String)
XmlHelper.CreatespPrNode(String, Boolean)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public sealed class ExcelStyles : XmlHelper

Fields

Borders

Contain all border styles for the package

Declaration
public ExcelStyleCollection<ExcelBorderXml> Borders
Field Value
Type Description
ExcelStyleCollection<ExcelBorderXml>

CellStyleXfs

Contain all named cell styles for the package

Declaration
public ExcelStyleCollection<ExcelXfs> CellStyleXfs
Field Value
Type Description
ExcelStyleCollection<ExcelXfs>

CellXfs

Contain all cell styles for the package

Declaration
public ExcelStyleCollection<ExcelXfs> CellXfs
Field Value
Type Description
ExcelStyleCollection<ExcelXfs>

Dxfs

Contain all differential formatting styles for the package

Declaration
public ExcelStyleCollection<ExcelDxfStyleConditionalFormatting> Dxfs
Field Value
Type Description
ExcelStyleCollection<ExcelDxfStyleConditionalFormatting>

Fills

Contains all fill styles for the package

Declaration
public ExcelStyleCollection<ExcelFillXml> Fills
Field Value
Type Description
ExcelStyleCollection<ExcelFillXml>

Fonts

Contains all font styles for the package

Declaration
public ExcelStyleCollection<ExcelFontXml> Fonts
Field Value
Type Description
ExcelStyleCollection<ExcelFontXml>

NamedStyles

Contain all named styles for that package

Declaration
public ExcelStyleCollection<ExcelNamedStyleXml> NamedStyles
Field Value
Type Description
ExcelStyleCollection<ExcelNamedStyleXml>

NumberFormats

Contains all numberformats for the package

Declaration
public ExcelStyleCollection<ExcelNumberFormatXml> NumberFormats
Field Value
Type Description
ExcelStyleCollection<ExcelNumberFormatXml>

Methods

CreateNamedStyle(String)

Creates a named style that can be applied to cells in the worksheet.

Declaration
public ExcelNamedStyleXml CreateNamedStyle(string name)
Parameters
Type Name Description
System.String name

The name of the style

Returns
Type Description
ExcelNamedStyleXml

A named style object that can be custumized

CreateNamedStyle(String, ExcelStyle)

Creates a named style that can be applied to cells in the worksheet.

Declaration
public ExcelNamedStyleXml CreateNamedStyle(string name, ExcelStyle Template)
Parameters
Type Name Description
System.String name

The name of the style

ExcelStyle Template

A template style

Returns
Type Description
ExcelNamedStyleXml

A named style object that can be custumized

UpdateXml()

Update the changes to the Style.Xml file inside the package. This will remove any unused styles from the collections.

Declaration
public void UpdateXml()
Back to top Generated by DocFX