Edit

Share via


Excel.Interfaces.StyleData interface

An interface describing the data returned by calling style.toJSON().

Properties

autoIndent

Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution.

borders

A collection of four border objects that represent the style of the four borders.

builtIn

Specifies if the style is a built-in style.

fill

The fill of the style.

font

A Font object that represents the font of the style.

formulaHidden

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

horizontalAlignment

Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details.

includeAlignment

Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties.

includeBorder

Specifies if the style includes the color, color index, line style, and weight border properties.

includeFont

Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties.

includeNumber

Specifies if the style includes the number format property.

includePatterns

Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties.

includeProtection

Specifies if the style includes the formula hidden and locked protection properties.

indentLevel

An integer from 0 to 250 that indicates the indent level for the style.

locked

Specifies if the object is locked when the worksheet is protected.

name

The name of the style.

numberFormat

The format code of the number format for the style.

numberFormatLocal

The localized format code of the number format for the style.

readingOrder

The reading order for the style.

shrinkToFit

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

textOrientation

The text orientation for the style.

verticalAlignment

Specifies the vertical alignment for the style. See Excel.VerticalAlignment for details.

wrapText

Specifies if Excel wraps the text in the object.

Property Details

autoIndent

Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution.

TypeScript
autoIndent?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.8 ]

borders

A collection of four border objects that represent the style of the four borders.

TypeScript
borders?: Excel.Interfaces.RangeBorderData[];

Property Value

Remarks

[ API set: ExcelApi 1.7 ]

builtIn

Specifies if the style is a built-in style.

TypeScript
builtIn?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

fill

The fill of the style.

TypeScript
fill?: Excel.Interfaces.RangeFillData;

Property Value

Remarks

[ API set: ExcelApi 1.7 ]

font

A Font object that represents the font of the style.

TypeScript
font?: Excel.Interfaces.RangeFontData;

Property Value

Remarks

[ API set: ExcelApi 1.7 ]

formulaHidden

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

TypeScript
formulaHidden?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

horizontalAlignment

Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details.

TypeScript
horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed";

Property Value

Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"

Remarks

[ API set: ExcelApi 1.7 ]

includeAlignment

Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties.

TypeScript
includeAlignment?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

includeBorder

Specifies if the style includes the color, color index, line style, and weight border properties.

TypeScript
includeBorder?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

includeFont

Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties.

TypeScript
includeFont?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

includeNumber

Specifies if the style includes the number format property.

TypeScript
includeNumber?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

includePatterns

Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties.

TypeScript
includePatterns?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

includeProtection

Specifies if the style includes the formula hidden and locked protection properties.

TypeScript
includeProtection?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

indentLevel

An integer from 0 to 250 that indicates the indent level for the style.

TypeScript
indentLevel?: number;

Property Value

number

Remarks

[ API set: ExcelApi 1.7 ]

locked

Specifies if the object is locked when the worksheet is protected.

TypeScript
locked?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

name

The name of the style.

TypeScript
name?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.7 ]

numberFormat

The format code of the number format for the style.

TypeScript
numberFormat?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.7 ]

numberFormatLocal

The localized format code of the number format for the style.

TypeScript
numberFormatLocal?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.7 ]

readingOrder

The reading order for the style.

TypeScript
readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft";

Property Value

Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"

Remarks

[ API set: ExcelApi 1.7 ]

shrinkToFit

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

TypeScript
shrinkToFit?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]

textOrientation

The text orientation for the style.

TypeScript
textOrientation?: number;

Property Value

number

Remarks

[ API set: ExcelApi 1.8 ]

verticalAlignment

Specifies the vertical alignment for the style. See Excel.VerticalAlignment for details.

TypeScript
verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed";

Property Value

Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"

Remarks

[ API set: ExcelApi 1.7 ]

wrapText

Specifies if Excel wraps the text in the object.

TypeScript
wrapText?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.7 ]