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
| Name | Type | Access | Description |
|---|---|---|---|
font | : Font | Read/Write | Gets or sets the font. |
fill | : Fill | Read/Write | Gets or sets the fill. |
border | : Border | Read/Write | Gets or sets the border. |
alignment | : Alignment | Read/Write | Gets or sets the alignment. |
numberFormat | : string | Read/Write | Gets or sets the number format. |
protection | : Protection | Read/Write | Gets or sets the protection. |
Methods
| Signature | Description |
|---|---|
constructor() | Calls constructor on this Style instance. |
getFont() → Font | Returns the font. |
setFont(font: Font) | Sets the font value. |
getFill() → Fill | Returns the fill. |
setFill(fill: Fill) | Sets the fill value. |
getBorder() → Border | Returns the border. |
setBorder(border: Border) | Sets the border value. |
getAlignment() → Alignment | Returns the alignment. |
setAlignment(alignment: Alignment) | Sets the alignment value. |
setNumberFormat(format: string) | Sets the number format value. |
getNumberFormat() → string | undefined | Returns the number format. |
setProtection(protection: Protection) | Sets the protection value. |
isBold() → boolean | Returns true if bold is set. |
setBold(bold: boolean) | Sets the bold value. |
isItalic() → boolean | Returns true if italic is set. |
setItalic(italic: boolean) | Sets the italic value. |
getFontName() → string | Returns the font name. |
setFontName(name: string) | Sets the font name value. |
getFontSize() → number | Returns the font size. |
setFontSize(size: number) | Sets the font size value. |
getFontColor() → string | undefined | Returns the font color. |
setFontColor(color: string) | Sets the font color value. |
getForegroundColor() → string | undefined | Returns the foreground color. |
setForegroundColor(color: string) | Sets the foreground color value. |
getBackgroundColor() → string | undefined | Returns the background color. |
setBackgroundColor(color: string) | Sets the background color value. |
getHorizontalAlignment() → string | Returns the horizontal alignment. |
setHorizontalAlignment(alignment: Alignment["horizontal"]) | Sets the horizontal alignment value. |
getVerticalAlignment() → string | Returns the vertical alignment. |
setVerticalAlignment(alignment: Alignment["vertical"]) | Sets the vertical alignment value. |
isWrapText() → boolean | Returns true if wrap text is set. |
setWrapText(wrapText: boolean) | Sets the wrap text value. |
isLocked() → boolean | Returns true if locked is set. |
setLocked(locked: boolean) | Sets the locked value. |
isHidden() → boolean | Returns true if hidden is set. |
setHidden(hidden: boolean) | Sets the hidden value. |
toXml() → string | Calls toXml on this Style instance. |