Show / Hide Table of Contents

Class Styles

Contains style information for a workbook. In general, you should not use this class directly. Instead, you should set properties on cells and ranges.

Inheritance
System.Object
Styles
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public sealed class Styles : object

Constructors

Styles()

Declaration
public Styles()

Styles(Workbook)

Declaration
public Styles(Workbook workbook)
Parameters
Type Name Description
Workbook workbook

Fields

DefaultFontStyleName

Declaration
public const string DefaultFontStyleName = null
Field Value
Type Description
System.String

Properties

IndexedColors

Declaration
public List<SpreadsheetColor> IndexedColors { get; }
Property Value
Type Description
List<SpreadsheetColor>

TableStyles

Declaration
public TableStyleCollection TableStyles { get; }
Property Value
Type Description
TableStyleCollection

ThemeColors

Declaration
public List<SpreadsheetColor> ThemeColors { get; }
Property Value
Type Description
List<SpreadsheetColor>

Methods

AddBuiltInStyle(StyleSheetCellStyle)

Declaration
public void AddBuiltInStyle(StyleSheetCellStyle cellStyle)
Parameters
Type Name Description
StyleSheetCellStyle cellStyle

AddCustomStyle(CellStyle)

Declaration
public void AddCustomStyle(CellStyle cellStyle)
Parameters
Type Name Description
CellStyle cellStyle

GetColorIndex(SpreadsheetColor, Int32)

Declaration
public int GetColorIndex(SpreadsheetColor color, int nullValue)
Parameters
Type Name Description
SpreadsheetColor color
System.Int32 nullValue
Returns
Type Description
System.Int32

GetCustomStyle(String)

Declaration
public StyleSheetCellStyle GetCustomStyle(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
StyleSheetCellStyle

GetIndexedColorAsColor(Int32)

Declaration
public SpreadsheetColor GetIndexedColorAsColor(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
SpreadsheetColor
Remarks

IF the stylesheet contains indexed colors use those. If not get the color from the standard indexed colors palette.

GetStyle(String)

Declaration
public StyleSheetCellStyle GetStyle(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
StyleSheetCellStyle
Back to top Generated by DocFX