Struct CellStyle
A column- or row-level cell style: number format, font, fill, borders, and alignment. Register one with AddStyle(CellStyle).
public readonly record struct CellStyle : IEquatable<CellStyle>
- Implements
- Inherited Members
Fields
StackedTextRotation
The Rotation value that stacks text vertically, one character above the next.
public const int StackedTextRotation = 255
Field Value
Properties
Bold
Gets a value indicating whether text in cells using this style is bold.
public bool Bold { get; init; }
Property Value
Bottom
Gets the bottom border, or null for none.
public CellBorder? Bottom { get; init; }
Property Value
FillColor
Gets the solid background color, or null for no fill.
public ExcelColor? FillColor { get; init; }
Property Value
FontColor
Gets the font color, or null for the default color.
public ExcelColor? FontColor { get; init; }
Property Value
FontName
Gets the font family name (1 to 31 characters), or null for the default font.
public string? FontName { get; init; }
Property Value
FontSize
Gets the font size in points (1 to 409), or null for the default size.
public double? FontSize { get; init; }
Property Value
HorizontalAlignment
Gets the horizontal alignment.
public ExcelHorizontalAlignment HorizontalAlignment { get; init; }
Property Value
Indent
Gets the indent level (0 to 15).
public int Indent { get; init; }
Property Value
Italic
Gets a value indicating whether text in cells using this style is italic.
public bool Italic { get; init; }
Property Value
Left
Gets the left border, or null for none.
public CellBorder? Left { get; init; }
Property Value
NumberFormat
Gets the Excel number-format code (e.g. "#,##0.00", "yyyy-mm-dd", "0.0%"), or null for the general format.
public string? NumberFormat { get; init; }
Property Value
Right
Gets the right border, or null for none.
public CellBorder? Right { get; init; }
Property Value
Rotation
Gets the text rotation in degrees (-90 to 90), or StackedTextRotation.
public int Rotation { get; init; }
Property Value
Strikethrough
Gets a value indicating whether text in cells using this style is struck through.
public bool Strikethrough { get; init; }
Property Value
Top
Gets the top border, or null for none.
public CellBorder? Top { get; init; }
Property Value
Underline
Gets a value indicating whether text in cells using this style is underlined.
public bool Underline { get; init; }
Property Value
VerticalAlignment
Gets the vertical alignment.
public ExcelVerticalAlignment VerticalAlignment { get; init; }
Property Value
WrapText
Gets a value indicating whether text wraps within the cell.
public bool WrapText { get; init; }