Style
Overview
Style is a class in Aspose.Cells FOSS for .NET.
Represents a mutable cell style facade that can be applied to one or more cells. var workbook = new Workbook(); var cell = workbook.Worksheets[0].Cells[“C3”]; var style = cell.GetStyle(); style.Font.IsBold = true; style.NumberFormat = “$#,##0.00”; style.HorizontalAlignment = HorizontalAlignmentType.Center; cell.SetStyle(style);
This class provides 4 methods for working with Style objects in Go programs.
Available methods include: Copy, Equals, GetHashCode, Style.
All exported members are accessible to any Go application after adding the package via go get github.com/aspose-pdf-foss/aspose-pdf-foss-for-go.
Properties: BackgroundColor, Borders, Custom, Font, ForegroundColor, HorizontalAlignment, and 13 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Font | Font | Read | Gets the font. |
Borders | Borders | Read | Gets the borders. |
Pattern | FillPattern | Read/Write | Gets or sets the pattern. |
ForegroundColor | Color | Read/Write | Gets or sets the foreground color. |
BackgroundColor | Color | Read/Write | Gets or sets the background color. |
Number | int | Read/Write | Gets or sets the number. |
Custom | string | Read/Write | Gets or sets the custom. |
NumberFormat | string | Read/Write | Gets or sets the number format. |
HorizontalAlignment | HorizontalAlignmentType | Read/Write | Gets or sets the horizontal alignment. |
VerticalAlignment | VerticalAlignmentType | Read/Write | Gets or sets the vertical alignment. |
WrapText | bool | Read/Write | Gets or sets the wrap text. |
IndentLevel | int | Read/Write | Gets or sets the indent level. |
TextRotation | int | Read/Write | Gets or sets the text rotation. |
ShrinkToFit | bool | Read/Write | Gets or sets the shrink to fit. |
ReadingOrder | int | Read/Write | Gets or sets the reading order. |
RelativeIndent | int | Read/Write | Gets or sets the relative indent. |
IsLocked | bool | Read/Write | Gets or sets the is locked. |
IsHidden | bool | Read/Write | Gets or sets the is hidden. |
QuotePrefix | bool | Read/Write | Gets or sets the quote prefix. |
Methods
| Signature | Description |
|---|---|
Style() | Creates a new style instance |
Copy(source: Style) | Copies data from another style object. |
Equals(obj: object) | Determines whether two style instances are equal. |
GetHashCode() | Serves as a hash function for a style object. |