Style Class
Contents
[
Hide
]Style class
Represents display style of excel document,such as font,color,alignment,border,etc.The Style object contains all style attributes (font, number format, alignment, and so on) as properties.
type Style struct {
ptr unsafe.Pointer
}
Constructors
Method | Description |
---|
Methods
Method | Description |
---|---|
IsNull | Checks whether the implementation object is nullptr. |
GetBackgroundThemeColor | Gets and sets the background theme color. |
SetBackgroundThemeColor | Gets and sets the background theme color. |
GetForegroundThemeColor | Gets and sets the foreground theme color. |
SetForegroundThemeColor | Gets and sets the foreground theme color. |
GetName | Gets or sets the name of the style. |
SetName | Gets or sets the name of the style. |
GetPattern | Gets or sets the cell background pattern type. |
SetPattern | Gets or sets the cell background pattern type. |
SetPatternColor | Sets the background color. |
GetBorders | Gets the |
GetBackgroundColor | Gets or sets a style’s background color. |
SetBackgroundColor | Gets or sets a style’s background color. |
GetBackgroundArgbColor | Gets and sets the background color with a 32-bit ARGB value. |
SetBackgroundArgbColor | Gets and sets the background color with a 32-bit ARGB value. |
GetForegroundColor | Gets or sets a style’s foreground color. |
SetForegroundColor | Gets or sets a style’s foreground color. |
GetForegroundArgbColor | Gets and sets the foreground color with a 32-bit ARGB value. |
SetForegroundArgbColor | Gets and sets the foreground color with a 32-bit ARGB value. |
Copy | Copies data from another style object |
GetHasBorders | Checks whether there are borders have been set for the style. |
GetParentStyle | Gets the parent style of this style. |
Update | Apply the named style to the styles of the cells which use this named style.It works like clicking the “ok” button after you finished modifying the style.Only applies for named style. |
IsNumberFormatApplied | Indicate whether the number formatting should be applied. |
SetIsNumberFormatApplied | Indicate whether the number formatting should be applied. |
IsFontApplied | Indicate whether the font formatting should be applied. |
SetIsFontApplied | Indicate whether the font formatting should be applied. |
IsAlignmentApplied | Indicate whether the alignment formatting should be applied. |
SetIsAlignmentApplied | Indicate whether the alignment formatting should be applied. |
IsBorderApplied | Indicate whether the border formatting should be applied. |
SetIsBorderApplied | Indicate whether the border formatting should be applied. |
IsFillApplied | Indicate whether the fill formatting should be applied. |
SetIsFillApplied | Indicate whether the fill formatting should be applied. |
IsProtectionApplied | Indicate whether the protection formatting should be applied. |
SetIsProtectionApplied | Indicate whether the protection formatting should be applied. |
IsModified | Checks whether the specified properties of the style have been modified.Used for style of ConditionalFormattings to check whether the specified properties of this style should be used when applying the ConditionalFormattings on a cell. |
Equals | Determines whether two Style instances are equal. |
GetHashCode | Serves as a hash function for a Style object. |
GetIndentLevel | Represents the indent level for the cell or range. Can only be an integer from 0 to 250. |
SetIndentLevel | Represents the indent level for the cell or range. Can only be an integer from 0 to 250. |
GetFont | Gets a |
GetRotationAngle | Represents text rotation angle. |
SetRotationAngle | Represents text rotation angle. |
GetHorizontalAlignment | Gets or sets the horizontal alignment type of the text in a cell. |
SetHorizontalAlignment | Gets or sets the horizontal alignment type of the text in a cell. |
GetVerticalAlignment | Gets or sets the vertical alignment type of the text in a cell. |
SetVerticalAlignment | Gets or sets the vertical alignment type of the text in a cell. |
IsTextWrapped | Gets or sets a value indicating whether the text within a cell is wrapped. |
SetIsTextWrapped | Gets or sets a value indicating whether the text within a cell is wrapped. |
GetNumber | Gets or sets the display format of numbers and dates. The formatting patterns are different for different regions. |
SetNumber | Gets or sets the display format of numbers and dates. The formatting patterns are different for different regions. |
SetBorder_BorderType_CellBorderType_Color | Sets the borders of the style. |
SetBorder_BorderType_CellBorderType_CellsColor | Sets the borders of the style. |
IsLocked | Gets or sets a value indicating whether a cell can be modified or not. |
SetIsLocked | Gets or sets a value indicating whether a cell can be modified or not. |
SetCustom_String_Bool | Sets the Custom number format string of a cell. |
GetCustom | Represents the custom number format string of this style object.If the custom number format is not set(For example, the number format is builtin), "" will be returned. |
SetCustom_String | Represents the custom number format string of this style object.If the custom number format is not set(For example, the number format is builtin), "" will be returned. |
GetCultureCustom | Gets and sets the culture-dependent pattern string for number format.If no number format has been set for this object, null will be returned.If number format is builtin, the pattern string corresponding to the builtin number will be returned. |
SetCultureCustom | Gets and sets the culture-dependent pattern string for number format.If no number format has been set for this object, null will be returned.If number format is builtin, the pattern string corresponding to the builtin number will be returned. |
GetInvariantCustom | Gets the culture-independent pattern string for number format.If no number format has been set for this object, null will be returned.If number format is builtin, the pattern string corresponding to the builtin number will be returned. |
IsFormulaHidden | Represents if the formula will be hidden when the worksheet is protected. |
SetIsFormulaHidden | Represents if the formula will be hidden when the worksheet is protected. |
GetShrinkToFit | Represents if text automatically shrinks to fit in the available column width. |
SetShrinkToFit | Represents if text automatically shrinks to fit in the available column width. |
GetTextDirection | Represents text reading order. |
SetTextDirection | Represents text reading order. |
IsJustifyDistributed | Indicates if the cells justified or distributed alignment should be used on the last line of text. |
SetIsJustifyDistributed | Indicates if the cells justified or distributed alignment should be used on the last line of text. |
GetQuotePrefix | Indicates whether the cell’s value starts with single quote mark. |
SetQuotePrefix | Indicates whether the cell’s value starts with single quote mark. |
IsGradient | Indicates whether the cell shading is a gradient pattern. |
SetIsGradient | Indicates whether the cell shading is a gradient pattern. |
SetTwoColorGradient | Sets the specified fill to a two-color gradient. |
GetTwoColorGradientSetting | Get the two-color gradient setting. |
IsPercent | Indicates whether the number format is a percent format. |
IsDateTime | Indicates whether the number format is a date format. |
ToJson | Convert |