ExcelScript.PredefinedCellStyle interface
An object encapsulating a style's format and other properties.
Methods
delete() | Deletes this style. |
get |
Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. |
get |
A collection of four border objects that represent the style of the four borders. |
get |
Specifies if the style is a built-in style. |
get |
The fill of the style. |
get |
A |
get |
Specifies if the formula will be hidden when the worksheet is protected. |
get |
Represents the horizontal alignment for the style. See |
get |
Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. |
get |
Specifies if the style includes the color, color index, line style, and weight border properties. |
get |
Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. |
get |
Specifies if the style includes the number format property. |
get |
Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. |
get |
Specifies if the style includes the formula hidden and locked protection properties. |
get |
An integer from 0 to 250 that indicates the indent level for the style. |
get |
Specifies if the object is locked when the worksheet is protected. |
get |
The name of the style. |
get |
The format code of the number format for the style. |
get |
The localized format code of the number format for the style. |
get |
Gets a border object using its name. |
get |
Specifies a double that lightens or darkens a color for range borders. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A |
get |
The reading order for the style. |
get |
Specifies if text automatically shrinks to fit in the available column width. |
get |
The text orientation for the style. |
get |
Specifies the vertical alignment for the style. See |
get |
Specifies if Excel wraps the text in the object. |
set |
Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. |
set |
Specifies if the formula will be hidden when the worksheet is protected. |
set |
Represents the horizontal alignment for the style. See |
set |
Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. |
set |
Specifies if the style includes the color, color index, line style, and weight border properties. |
set |
Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. |
set |
Specifies if the style includes the number format property. |
set |
Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. |
set |
Specifies if the style includes the formula hidden and locked protection properties. |
set |
An integer from 0 to 250 that indicates the indent level for the style. |
set |
Specifies if the object is locked when the worksheet is protected. |
set |
The format code of the number format for the style. |
set |
The localized format code of the number format for the style. |
set |
Specifies a double that lightens or darkens a color for range borders. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A |
set |
The reading order for the style. |
set |
Specifies if text automatically shrinks to fit in the available column width. |
set |
The text orientation for the style. |
set |
Specifies the vertical alignment for the style. See |
set |
Specifies if Excel wraps the text in the object. |
Method Details
delete()
Deletes this style.
delete(): void;
Returns
void
getAutoIndent()
Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution.
getAutoIndent(): boolean;
Returns
boolean
getBorders()
A collection of four border objects that represent the style of the four borders.
getBorders(): RangeBorder[];
Returns
getBuiltIn()
Specifies if the style is a built-in style.
getBuiltIn(): boolean;
Returns
boolean
getFill()
getFont()
A Font
object that represents the font of the style.
getFont(): RangeFont;
Returns
getFormulaHidden()
Specifies if the formula will be hidden when the worksheet is protected.
getFormulaHidden(): boolean;
Returns
boolean
getHorizontalAlignment()
Represents the horizontal alignment for the style. See ExcelScript.HorizontalAlignment
for details.
getHorizontalAlignment(): HorizontalAlignment;
Returns
getIncludeAlignment()
Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties.
getIncludeAlignment(): boolean;
Returns
boolean
getIncludeBorder()
Specifies if the style includes the color, color index, line style, and weight border properties.
getIncludeBorder(): boolean;
Returns
boolean
getIncludeFont()
Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties.
getIncludeFont(): boolean;
Returns
boolean
getIncludeNumber()
Specifies if the style includes the number format property.
getIncludeNumber(): boolean;
Returns
boolean
getIncludePatterns()
Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties.
getIncludePatterns(): boolean;
Returns
boolean
getIncludeProtection()
Specifies if the style includes the formula hidden and locked protection properties.
getIncludeProtection(): boolean;
Returns
boolean
getIndentLevel()
An integer from 0 to 250 that indicates the indent level for the style.
getIndentLevel(): number;
Returns
number
getLocked()
Specifies if the object is locked when the worksheet is protected.
getLocked(): boolean;
Returns
boolean
getName()
The name of the style.
getName(): string;
Returns
string
getNumberFormat()
The format code of the number format for the style.
getNumberFormat(): string;
Returns
string
getNumberFormatLocal()
The localized format code of the number format for the style.
getNumberFormatLocal(): string;
Returns
string
getRangeBorder(index)
Gets a border object using its name.
getRangeBorder(index: BorderIndex): RangeBorder;
Parameters
- index
- ExcelScript.BorderIndex
Index value of the border object to be retrieved. See ExcelScript.BorderIndex
for details.
Returns
getRangeBorderTintAndShade()
Specifies a double that lightens or darkens a color for range borders. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A null
value indicates that the entire border collection doesn't have a uniform tintAndShade
setting.
getRangeBorderTintAndShade(): number;
Returns
number
getReadingOrder()
getShrinkToFit()
Specifies if text automatically shrinks to fit in the available column width.
getShrinkToFit(): boolean;
Returns
boolean
getTextOrientation()
The text orientation for the style.
getTextOrientation(): number;
Returns
number
getVerticalAlignment()
Specifies the vertical alignment for the style. See ExcelScript.VerticalAlignment
for details.
getVerticalAlignment(): VerticalAlignment;
Returns
getWrapText()
Specifies if Excel wraps the text in the object.
getWrapText(): boolean;
Returns
boolean
setAutoIndent(autoIndent)
Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution.
setAutoIndent(autoIndent: boolean): void;
Parameters
- autoIndent
-
boolean
Returns
void
setFormulaHidden(formulaHidden)
Specifies if the formula will be hidden when the worksheet is protected.
setFormulaHidden(formulaHidden: boolean): void;
Parameters
- formulaHidden
-
boolean
Returns
void
setHorizontalAlignment(horizontalAlignment)
Represents the horizontal alignment for the style. See ExcelScript.HorizontalAlignment
for details.
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment): void;
Parameters
- horizontalAlignment
- ExcelScript.HorizontalAlignment
Returns
void
setIncludeAlignment(includeAlignment)
Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties.
setIncludeAlignment(includeAlignment: boolean): void;
Parameters
- includeAlignment
-
boolean
Returns
void
setIncludeBorder(includeBorder)
Specifies if the style includes the color, color index, line style, and weight border properties.
setIncludeBorder(includeBorder: boolean): void;
Parameters
- includeBorder
-
boolean
Returns
void
setIncludeFont(includeFont)
Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties.
setIncludeFont(includeFont: boolean): void;
Parameters
- includeFont
-
boolean
Returns
void
setIncludeNumber(includeNumber)
Specifies if the style includes the number format property.
setIncludeNumber(includeNumber: boolean): void;
Parameters
- includeNumber
-
boolean
Returns
void
setIncludePatterns(includePatterns)
Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties.
setIncludePatterns(includePatterns: boolean): void;
Parameters
- includePatterns
-
boolean
Returns
void
setIncludeProtection(includeProtection)
Specifies if the style includes the formula hidden and locked protection properties.
setIncludeProtection(includeProtection: boolean): void;
Parameters
- includeProtection
-
boolean
Returns
void
setIndentLevel(indentLevel)
An integer from 0 to 250 that indicates the indent level for the style.
setIndentLevel(indentLevel: number): void;
Parameters
- indentLevel
-
number
Returns
void
setLocked(locked)
Specifies if the object is locked when the worksheet is protected.
setLocked(locked: boolean): void;
Parameters
- locked
-
boolean
Returns
void
setNumberFormat(numberFormat)
The format code of the number format for the style.
setNumberFormat(numberFormat: string): void;
Parameters
- numberFormat
-
string
Returns
void
setNumberFormatLocal(numberFormatLocal)
The localized format code of the number format for the style.
setNumberFormatLocal(numberFormatLocal: string): void;
Parameters
- numberFormatLocal
-
string
Returns
void
setRangeBorderTintAndShade(rangeBorderTintAndShade)
Specifies a double that lightens or darkens a color for range borders. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A null
value indicates that the entire border collection doesn't have a uniform tintAndShade
setting.
setRangeBorderTintAndShade(rangeBorderTintAndShade: number): void;
Parameters
- rangeBorderTintAndShade
-
number
Returns
void
setReadingOrder(readingOrder)
The reading order for the style.
setReadingOrder(readingOrder: ReadingOrder): void;
Parameters
- readingOrder
- ExcelScript.ReadingOrder
Returns
void
setShrinkToFit(shrinkToFit)
Specifies if text automatically shrinks to fit in the available column width.
setShrinkToFit(shrinkToFit: boolean): void;
Parameters
- shrinkToFit
-
boolean
Returns
void
setTextOrientation(textOrientation)
The text orientation for the style.
setTextOrientation(textOrientation: number): void;
Parameters
- textOrientation
-
number
Returns
void
setVerticalAlignment(verticalAlignment)
Specifies the vertical alignment for the style. See ExcelScript.VerticalAlignment
for details.
setVerticalAlignment(verticalAlignment: VerticalAlignment): void;
Parameters
- verticalAlignment
- ExcelScript.VerticalAlignment
Returns
void
setWrapText(wrapText)
Specifies if Excel wraps the text in the object.
setWrapText(wrapText: boolean): void;
Parameters
- wrapText
-
boolean
Returns
void
Office Scripts