Style
Overview
Style is a class in Aspose.Cells for NET.
Style.Style creates a new style instance with default values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Font | Font | Read/Write | Gets or sets the font applied to the style |
Borders | Borders | Read/Write | Gets or sets the Borders collection defining cell borders |
Pattern | FillPattern | Read/Write | Gets or sets the FillPattern used for cell background |
ForegroundColor | Color | Read/Write | Gets or sets the foreground color of the style fill |
BackgroundColor | Color | Read/Write | Gets or sets the background color of the style fill |
Number | int | Read/Write | Gets or sets the built‑in number format index for the style |
Custom | string? | Read/Write | Gets or sets a custom number format string, or null if not set |
NumberFormat | string | Read/Write | Gets or sets the number format string applied to the style |
HorizontalAlignment | HorizontalAlignmentType | Read/Write | Gets or sets the horizontal alignment of cell content |
VerticalAlignment | VerticalAlignmentType | Read/Write | Gets or sets the vertical alignment of cell content |
WrapText | bool | Read/Write | Gets or sets whether text wrapping is enabled for the style |
IndentLevel | int | Read/Write | Gets or sets the indentation level for the cell text |
TextRotation | int | Read/Write | Gets or sets the text rotation angle for the style |
ShrinkToFit | bool | Read/Write | Gets or sets whether text is shrunk to fit the cell width |
ReadingOrder | int | Read/Write | Gets or sets the reading order (LTR or RTL) for the style |
RelativeIndent | int | Read/Write | |
IsLocked | bool | Read/Write | Gets or sets whether the cell is locked when sheet protection is applied |
IsHidden | bool | Read/Write | Gets or sets whether cells with this style are hidden |
Methods
| Signature | Description |
|---|---|
Style() | Creates a new Style object with default formatting |
Clone() | Returns a deep copy of the style |