Style

Overview

Style is a class in Aspose.Cells FOSS for TypeScript. Inherits from: StyleType.

This class declares 37 methods for Style objects in TypeScript programs. Available methods include: constructor, getAlignment, getBackgroundColor, getBorder, getFill, getFont, getFontColor, getFontName, getFontSize, getForegroundColor, getHorizontalAlignment, getNumberFormat, and 25 additional methods. Public members are accessible to any TypeScript application after installing the Aspose.Cells FOSS for TypeScript package. Properties: alignment, border, fill, font, numberFormat, protection.

Properties

NameTypeAccessDescription
font: FontRead/WriteGets or sets the font.
fill: FillRead/WriteGets or sets the fill.
border: BorderRead/WriteGets or sets the border.
alignment: AlignmentRead/WriteGets or sets the alignment.
numberFormat: stringRead/WriteGets or sets the number format.
protection: ProtectionRead/WriteGets or sets the protection.

Methods

SignatureDescription
constructor()Calls constructor on this Style instance.
getFont()FontReturns the font.
setFont(font: Font)Sets the font value.
getFill()FillReturns the fill.
setFill(fill: Fill)Sets the fill value.
getBorder()BorderReturns the border.
setBorder(border: Border)Sets the border value.
getAlignment()AlignmentReturns the alignment.
setAlignment(alignment: Alignment)Sets the alignment value.
setNumberFormat(format: string)Sets the number format value.
getNumberFormat()string | undefinedReturns the number format.
setProtection(protection: Protection)Sets the protection value.
isBold()booleanReturns true if bold is set.
setBold(bold: boolean)Sets the bold value.
isItalic()booleanReturns true if italic is set.
setItalic(italic: boolean)Sets the italic value.
getFontName()stringReturns the font name.
setFontName(name: string)Sets the font name value.
getFontSize()numberReturns the font size.
setFontSize(size: number)Sets the font size value.
getFontColor()string | undefinedReturns the font color.
setFontColor(color: string)Sets the font color value.
getForegroundColor()string | undefinedReturns the foreground color.
setForegroundColor(color: string)Sets the foreground color value.
getBackgroundColor()string | undefinedReturns the background color.
setBackgroundColor(color: string)Sets the background color value.
getHorizontalAlignment()stringReturns the horizontal alignment.
setHorizontalAlignment(alignment: Alignment["horizontal"])Sets the horizontal alignment value.
getVerticalAlignment()stringReturns the vertical alignment.
setVerticalAlignment(alignment: Alignment["vertical"])Sets the vertical alignment value.
isWrapText()booleanReturns true if wrap text is set.
setWrapText(wrapText: boolean)Sets the wrap text value.
isLocked()booleanReturns true if locked is set.
setLocked(locked: boolean)Sets the locked value.
isHidden()booleanReturns true if hidden is set.
setHidden(hidden: boolean)Sets the hidden value.
toXml()stringCalls toXml on this Style instance.

See Also