[]
Contains style elements used to define the appearance of the cells.
public class XLStyle : ICloneable
<p>Each <xref href="C1.Excel.XLStyle" data-throw-if-not-resolved="false"></xref> object may define one or more of the following
elements: font, format, background color, background pattern, foreground color, alignment, text direction, and word wrapping.
When displaying a cell, Excel combines the row, column, and cell styles and merges the style elements defined in each one in order to determine how the cell should be displayed. The precedence of the styles is: (1) cell, (2) row, (3) column, (4) default style.
Every XLStyle belongs to a C1XLBook, and may be assigned to one or more XLRow, XLColumn, and XLCell objects through their Style property.
Name | Description |
---|---|
XLStyle(C1XLBook) | Creates a new instance of XLStyle and adds it to the specified C1XLBook. |
Name | Description |
---|---|
AlignHorz | Gets or sets the horizontal alignment for this XLStyle. |
AlignVert | Gets or sets the vertical alignment for this XLStyle. |
BackColor | Gets or sets the background color for this XLStyle. |
BackPattern | Gets or sets the background pattern for this XLStyle. |
BorderBottom | Gets or sets the line style used to draw the bottom border. |
BorderColorBottom | Gets or sets the color used to draw the bottom border. |
BorderColorLeft | Gets or sets the color used to draw the left border. |
BorderColorRight | Gets or sets the color used to draw the right border. |
BorderColorTop | Gets or sets the color used to draw the top border. |
BorderLeft | Gets or sets the line style used to draw the left border. |
BorderRight | Gets or sets the line style used to draw the right border. |
BorderTop | Gets or sets the line style used to draw the top border. |
Diagonal | Gets or sets which diagonal lines to display (none, forward, backward). |
DiagonalColor | Gets or sets the color used to draw the diagonal lines. |
DiagonalStyle | Gets or sets the line style used to draw the diagonal lines. |
Direction | Gets or sets the context reading direction for this XLStyle. |
Font | Gets or sets the font for this XLStyle. |
ForeColor | Gets or sets the foreground color for this XLStyle. |
Format | Gets or sets the format associated with this XLStyle. |
Indent | Gets or sets the indent cell contents for this XLStyle. |
IsAutoBackColor | Gets whether background color of this XLStyle is automatic. |
Locked | Gets or sets whether the cell should be locked for editing when the XLSheet is protected. |
PatternColor | Gets or sets the color of the background pattern for this XLStyle. |
QuotePrefix | Gets or sets whether the cell text value should be with quote prefix (single quotation mark) or no. |
Rotation | Gets or sets the rotation for this XLStyle, in degrees. |
ShrinkToFit | Gets or sets whether this XLStyle causes cell contents to shrink to fit. |
WordWrap | Gets or sets whether this XLStyle causes cell contents to wrap. |
Name | Description |
---|---|
Clone() | Creates a new XLStyle object that is a copy of the current instance. |
ColorFromIndex(int) | Gets standard palette color. |
Equals(object) | Determines whether two XLStyle objects are equivalent. |
FormatDotNetToXL(string) | Converts a .NET-style format string into an Excel format string. |
FormatDotNetToXL(string, CultureInfo) | Converts a .NET-style format string into an Excel format string. |
FormatDotNetToXL(string, Type) | Converts a .NET-style format string into an Excel format string. |
FormatDotNetToXL(string, Type, CultureInfo) | Converts a .NET-style format string into an Excel format string. |
FormatJapaneseDateTime(string, DateTime) | Converts .NET-style format string to New Japanese Era. |
FormatXLToDotNet(string) | Converts an Excel-style format string into a .NET-style format string. |
FormatXLToDotNet(string, CultureInfo) | Converts an Excel-style format string into a .NET-style format string. |
GetHashCode() | Serves as a hash function suitable for use in hashing algorithms and data structures like a hash table. |
IndexFromColor(Color) | Search for the nearest color in the RGB space. |
SetBorderColor(Color) | Sets the border color for this XLStyle. |
SetBorderStyle(XLLineStyle) | Sets the border style for this XLStyle. |