Class ExcelStyles¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Containts all shared cell styles for a workbook
Inheritance¶
object ← XmlHelper ← ExcelStyles
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object?, object?)
object.ToString()
Fields¶
Borders¶
Contain all border styles for the package
Field Value¶
ExcelStyleCollection<ExcelBorderXml>
CellStyleXfs¶
Contain all named cell styles for the package
Field Value¶
ExcelStyleCollection<ExcelXfs>
CellXfs¶
Contain all cell styles for the package
Field Value¶
ExcelStyleCollection<ExcelXfs>
Dxfs¶
Contain differential formatting styles for the package. This collection does not contain style records for slicers.
Field Value¶
ExcelStyleCollection<ExcelDxfStyleBase>
Fills¶
Contains all fill styles for the package
Field Value¶
ExcelStyleCollection<ExcelFillXml>
Fonts¶
Contains all font styles for the package
Field Value¶
ExcelStyleCollection<ExcelFontXml>
NamedStyles¶
Contain all named styles for the package
Field Value¶
ExcelStyleCollection<ExcelNamedStyleXml>
NumberFormats¶
Contains all numberformats for the package
Field Value¶
ExcelStyleCollection<ExcelNumberFormatXml>
SlicerStyles¶
Contain all slicer styles for the package. Tables styles can be used to customly format tables and pivot tables.
Field Value¶
ExcelNamedStyleCollection<ExcelSlicerNamedStyle>
TableStyles¶
Contain all table styles for the package. Tables styles can be used to customly format tables and pivot tables.
Field Value¶
ExcelNamedStyleCollection<ExcelTableNamedStyleBase>
Methods¶
CreateNamedStyle(string)¶
Creates a named style that can be applied to cells in the worksheet.
Parameters¶
name string
The name of the style
Returns¶
A named style object that can be custumized
CreateNamedStyle(string, ExcelStyle)¶
Creates a named style that can be applied to cells in the worksheet.
Parameters¶
name string
The name of the style
Template ExcelStyle
A template style
Returns¶
A named style object that can be custumized
CreatePivotTableStyle(string)¶
Creates a tables style only visible for pivot tables and with elements specific to pivot tables.
Parameters¶
name string
The name of the style
Returns¶
The table style object
CreatePivotTableStyle(string, PivotTableStyles)¶
Creates a tables style only visible for pivot tables and with elements specific to pivot tables.
Parameters¶
name string
The name of the style
templateStyle PivotTableStyles
The built-in table style to use as a template for this custom style
Returns¶
The table style object
CreatePivotTableStyle(string, ExcelTableNamedStyleBase)¶
Creates a tables style only visible for pivot tables and with elements specific to pivot tables.
public ExcelPivotTableNamedStyle CreatePivotTableStyle(string name, ExcelTableNamedStyleBase templateStyle)
Parameters¶
name string
The name of the style
templateStyle ExcelTableNamedStyleBase
The table style to use as a template for this custom style
Returns¶
The table style object
CreateSlicerStyle(string)¶
Creates a custom slicer style.
Parameters¶
name string
The name of the style
Returns¶
The slicer style object
CreateSlicerStyle(string, eSlicerStyle)¶
Creates a custom slicer style.
Parameters¶
name string
The name of the style
templateStyle eSlicerStyle
The slicer style to use as a template for this custom style
Returns¶
The slicer style object
CreateSlicerStyle(string, ExcelSlicerNamedStyle)¶
Creates a custom named slicer style from another style.
Parameters¶
name string
The name of the style.
templateStyle ExcelSlicerNamedStyle
The slicer style to us as template.
Returns¶
CreateTableAndPivotTableStyle(string)¶
Creates a tables visible for tables and pivot tables and with elements for both.
Parameters¶
name string
The name of the style
Returns¶
ExcelTableAndPivotTableNamedStyle
The table style object
CreateTableAndPivotTableStyle(string, TableStyles)¶
Creates a tables visible for tables and pivot tables and with elements for both.
public ExcelTableAndPivotTableNamedStyle CreateTableAndPivotTableStyle(string name, TableStyles templateStyle)
Parameters¶
name string
The name of the style
templateStyle TableStyles
The built-in table style to use as a template for this custom style
Returns¶
ExcelTableAndPivotTableNamedStyle
The table style object
CreateTableAndPivotTableStyle(string, PivotTableStyles)¶
Creates a tables visible for tables and pivot tables and with elements for both.
public ExcelTableAndPivotTableNamedStyle CreateTableAndPivotTableStyle(string name, PivotTableStyles templateStyle)
Parameters¶
name string
The name of the style
templateStyle PivotTableStyles
The built-in pivot table style to use as a template for this custom style
Returns¶
ExcelTableAndPivotTableNamedStyle
The table style object
CreateTableAndPivotTableStyle(string, ExcelTableNamedStyleBase)¶
Creates a tables visible for tables and pivot tables and with elements for both.
public ExcelTableAndPivotTableNamedStyle CreateTableAndPivotTableStyle(string name, ExcelTableNamedStyleBase templateStyle)
Parameters¶
name string
The name of the style
templateStyle ExcelTableNamedStyleBase
The table style to use as a template for this custom style
Returns¶
ExcelTableAndPivotTableNamedStyle
The table style object
CreateTableStyle(string)¶
Creates a tables style only visible for tables and with elements specific to pivot tables.
Parameters¶
name string
The name of the style
Returns¶
The table style object
CreateTableStyle(string, TableStyles)¶
Creates a tables style only visible for tables and with elements specific to pivot tables.
Parameters¶
name string
The name of the style
templateStyle TableStyles
The built-in table style to use as a template for this custom style
Returns¶
The table style object
CreateTableStyle(string, ExcelTableNamedStyleBase)¶
Creates a tables style only visible for tables and with elements specific to pivot tables.
Parameters¶
name string
The name of the style
templateStyle ExcelTableNamedStyleBase
The table style to use as a template for this custom style
Returns¶
The table style object
UpdateXml()¶
Update the changes to the Style.Xml file inside the package. This will remove any unused styles from the collections.