Excel.Interfaces.StyleData interface
An interface describing the data returned by calling style.toJSON()
.
Properties
auto |
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. |
built |
Specifies if the style is a built-in style. |
fill | The fill of the style. |
font | A |
formula |
Specifies if the formula will be hidden when the worksheet is protected. |
horizontal |
Represents the horizontal alignment for the style. See |
include |
Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. |
include |
Specifies if the style includes the color, color index, line style, and weight border properties. |
include |
Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. |
include |
Specifies if the style includes the number format property. |
include |
Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. |
include |
Specifies if the style includes the formula hidden and locked protection properties. |
indent |
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. |
number |
The format code of the number format for the style. |
number |
The localized format code of the number format for the style. |
reading |
The reading order for the style. |
shrink |
Specifies if text automatically shrinks to fit in the available column width. |
text |
The text orientation for the style. |
vertical |
Specifies the vertical alignment for the style. See |
wrap |
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.
autoIndent?: boolean;
Property Value
boolean
Remarks
borders
A collection of four border objects that represent the style of the four borders.
borders?: Excel.Interfaces.RangeBorderData[];
Property Value
Remarks
builtIn
Specifies if the style is a built-in style.
builtIn?: boolean;
Property Value
boolean
Remarks
fill
The fill of the style.
fill?: Excel.Interfaces.RangeFillData;
Property Value
Remarks
font
A Font
object that represents the font of the style.
font?: Excel.Interfaces.RangeFontData;
Property Value
Remarks
formulaHidden
Specifies if the formula will be hidden when the worksheet is protected.
formulaHidden?: boolean;
Property Value
boolean
Remarks
horizontalAlignment
Represents the horizontal alignment for the style. See Excel.HorizontalAlignment
for details.
horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed";
Property Value
Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"
Remarks
includeAlignment
Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties.
includeAlignment?: boolean;
Property Value
boolean
Remarks
includeBorder
Specifies if the style includes the color, color index, line style, and weight border properties.
includeBorder?: boolean;
Property Value
boolean
Remarks
includeFont
Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties.
includeFont?: boolean;
Property Value
boolean
Remarks
includeNumber
Specifies if the style includes the number format property.
includeNumber?: boolean;
Property Value
boolean
Remarks
includePatterns
Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties.
includePatterns?: boolean;
Property Value
boolean
Remarks
includeProtection
Specifies if the style includes the formula hidden and locked protection properties.
includeProtection?: boolean;
Property Value
boolean
Remarks
indentLevel
An integer from 0 to 250 that indicates the indent level for the style.
indentLevel?: number;
Property Value
number
Remarks
locked
Specifies if the object is locked when the worksheet is protected.
locked?: boolean;
Property Value
boolean
Remarks
name
numberFormat
The format code of the number format for the style.
numberFormat?: string;
Property Value
string
Remarks
numberFormatLocal
The localized format code of the number format for the style.
numberFormatLocal?: string;
Property Value
string
Remarks
readingOrder
The reading order for the style.
readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft";
Property Value
Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"
Remarks
shrinkToFit
Specifies if text automatically shrinks to fit in the available column width.
shrinkToFit?: boolean;
Property Value
boolean
Remarks
textOrientation
The text orientation for the style.
textOrientation?: number;
Property Value
number
Remarks
verticalAlignment
Specifies the vertical alignment for the style. See Excel.VerticalAlignment
for details.
verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed";
Property Value
Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"
Remarks
wrapText
Specifies if Excel wraps the text in the object.
wrapText?: boolean;
Property Value
boolean
Remarks
Office Add-ins