Table of Contents

Struct CellStyle

Namespace
ExcelReader.Core.Writer
Assembly
ExcelReader.Core.dll

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

int

Properties

Bold

Gets a value indicating whether text in cells using this style is bold.

public bool Bold { get; init; }

Property Value

bool

Bottom

Gets the bottom border, or null for none.

public CellBorder? Bottom { get; init; }

Property Value

CellBorder?

FillColor

Gets the solid background color, or null for no fill.

public ExcelColor? FillColor { get; init; }

Property Value

ExcelColor?

FontColor

Gets the font color, or null for the default color.

public ExcelColor? FontColor { get; init; }

Property Value

ExcelColor?

FontName

Gets the font family name (1 to 31 characters), or null for the default font.

public string? FontName { get; init; }

Property Value

string

FontSize

Gets the font size in points (1 to 409), or null for the default size.

public double? FontSize { get; init; }

Property Value

double?

HorizontalAlignment

Gets the horizontal alignment.

public ExcelHorizontalAlignment HorizontalAlignment { get; init; }

Property Value

ExcelHorizontalAlignment

Indent

Gets the indent level (0 to 15).

public int Indent { get; init; }

Property Value

int

Italic

Gets a value indicating whether text in cells using this style is italic.

public bool Italic { get; init; }

Property Value

bool

Left

Gets the left border, or null for none.

public CellBorder? Left { get; init; }

Property Value

CellBorder?

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

string

Right

Gets the right border, or null for none.

public CellBorder? Right { get; init; }

Property Value

CellBorder?

Rotation

Gets the text rotation in degrees (-90 to 90), or StackedTextRotation.

public int Rotation { get; init; }

Property Value

int

Strikethrough

Gets a value indicating whether text in cells using this style is struck through.

public bool Strikethrough { get; init; }

Property Value

bool

Top

Gets the top border, or null for none.

public CellBorder? Top { get; init; }

Property Value

CellBorder?

Underline

Gets a value indicating whether text in cells using this style is underlined.

public bool Underline { get; init; }

Property Value

bool

VerticalAlignment

Gets the vertical alignment.

public ExcelVerticalAlignment VerticalAlignment { get; init; }

Property Value

ExcelVerticalAlignment

WrapText

Gets a value indicating whether text wraps within the cell.

public bool WrapText { get; init; }

Property Value

bool