Table of Contents

Class CellStyleObject

Namespace
Spire.Xls
Assembly
Spire.XLS.dll
public class CellStyleObject : IStyle, IExtendedFormat, IExcelApplication, IOptimizedUpdate
Inheritance
CellStyleObject
Implements
Derived
Inherited Members

Properties

Borders

public IBorders Borders { get; }

Property Value

IBorders

BuiltIn

True if the style is a built-in style.

public bool BuiltIn { get; }

Property Value

bool

Color

Gets or sets the cell shading color.

public Color Color { get; set; }

Property Value

Color

FillPattern

Gets or Sets fill pattern type.

public ExcelPatternType FillPattern { get; set; }

Property Value

ExcelPatternType

Font

public IFont Font { get; }

Property Value

IFont

FormulaHidden

True if the formula will be hidden when the worksheet is protected.

public bool FormulaHidden { get; set; }

Property Value

bool

HorizontalAlignment

Returns or sets the horizontal alignment for the specified object.

public HorizontalAlignType HorizontalAlignment { get; set; }

Property Value

HorizontalAlignType

IncludeAlignment

True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, and Orientation properties.

public bool IncludeAlignment { get; set; }

Property Value

bool

IncludeBorder

True if the style includes the Color, KnownColor, LineStyle, and Weight border properties

public bool IncludeBorder { get; set; }

Property Value

bool

IncludeFont

True if the style includes the Background, Bold, Color, KnownColor, FontStyle, Italic, Name, OutlineFont, Shadow, Size, Strikethrough, Subscript, Superscript, and Underline font properties.

public bool IncludeFont { get; set; }

Property Value

bool

IncludeNumberFormat

True if the style includes the NumberFormat property.

public bool IncludeNumberFormat { get; set; }

Property Value

bool

IncludePatterns

True if the style includes the Color, KnownColor, InvertIfNegative, Pattern, PatternColor, and PatternKnownColor interior properties.

public bool IncludePatterns { get; set; }

Property Value

bool

IncludeProtection

True if the style includes the FormulaHidden and Locked protection properties.

public bool IncludeProtection { get; set; }

Property Value

bool

IndentLevel

Returns or sets the indent level for the style.

public int IndentLevel { get; set; }

Property Value

int

Interior

public IInterior Interior { get; }

Property Value

IInterior

IsFirstSymbolApostrophe

If true then first symbol in cell is apostrophe.

public bool IsFirstSymbolApostrophe { get; set; }

Property Value

bool

IsInitialized

public bool IsInitialized { get; }

Property Value

bool

IsModified

public bool IsModified { get; }

Property Value

bool

JustifyLast

Represents justify text alignment

public bool JustifyLast { get; set; }

Property Value

bool

KnownColor

Gets or sets the cell shading excel color.

public ExcelColors KnownColor { get; set; }

Property Value

ExcelColors

Locked

True if the object is locked; False if the object can be modified when the sheet is protected.

public bool Locked { get; set; }

Property Value

bool

Name

Returns or sets the name of the object. Read-only String.

public string Name { get; }

Property Value

string

NumberFormat

Returns or sets the format code for the object.

public string NumberFormat { get; set; }

Property Value

string

NumberFormatIndex

Gets or Sets format index.

public int NumberFormatIndex { get; set; }

Property Value

int

NumberFormatLocal

Returns or sets the format code for the object as a string in the language of the user.

public string NumberFormatLocal { get; set; }

Property Value

string

NumberFormatSettings

public INumberFormat NumberFormatSettings { get; }

Property Value

INumberFormat

Parent

public object Parent { get; }

Property Value

object

PatternColor

Returns or sets the color of the interior pattern.

public Color PatternColor { get; set; }

Property Value

Color

PatternKnownColor

Returns or sets the excel color of the interior.

public ExcelColors PatternKnownColor { get; set; }

Property Value

ExcelColors

ReadingOrder

Returns or sets the reading order for the specified object.

public ReadingOrderType ReadingOrder { get; set; }

Property Value

ReadingOrderType

Rotation

The text orientation. Can be an integer value from 1 to 180 degrees

public int Rotation { get; set; }

Property Value

int

ShrinkToFit

True if text automatically shrinks to fit in the available column width.

public bool ShrinkToFit { get; set; }

Property Value

bool

VerticalAlignment

Returns or sets the vertical alignment of the specified object.

public VerticalAlignType VerticalAlignment { get; set; }

Property Value

VerticalAlignType

WrapText

True if Microsoft Excel wraps the text in the object.

public bool WrapText { get; set; }

Property Value

bool

Methods

BeginUpdate()

public void BeginUpdate()

EndUpdate()

public void EndUpdate()

GetThemeColor(out ThemeColorType, out double)

Get the theme color.

public bool GetThemeColor(out ThemeColorType type, out double tint)

Parameters

type ThemeColorType

theme color type

tint double

Returns

bool

Remarks

If the color is a theme color, true returned, is not then false will be returned.

SetThemeColor(ThemeColorType, double)

Set the theme color.

public void SetThemeColor(ThemeColorType type, double tint)

Parameters

type ThemeColorType

theme color type

tint double