Table of Contents

Class StyleOptions

Namespace
SheetStream.Styles
Assembly
SheetStream.dll

Describes the appearance of a cell. Configure an instance (usually through Create(Action<StyleOptions>)) and the style sheet turns it into a registered, de-duplicated CellStyle.

public sealed class StyleOptions
Inheritance
StyleOptions
Inherited Members

Properties

Border

Border settings for the four edges.

public BorderOptions Border { get; }

Property Value

BorderOptions

Fill

Background fill settings.

public FillOptions Fill { get; }

Property Value

FillOptions

Font

Font settings (bold, italic, colour, size, name).

public FontOptions Font { get; }

Property Value

FontOptions

HorizontalAlignment

Horizontal alignment. Defaults to General.

public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

Indent

Indent level (each level is about three characters). 0 to 250.

public int Indent { get; set; }

Property Value

int

NumberFormat

Excel number format code, e.g. "#,##0.00", "yyyy-mm-dd" or "0%". null means "General". See NumberFormats for common codes.

public string? NumberFormat { get; set; }

Property Value

string

Protection

Cell protection flags; they only take effect once the sheet is protected.

public ProtectionOptions Protection { get; }

Property Value

ProtectionOptions

ShrinkToFit

Shrinks the font so the text fits the column width.

public bool ShrinkToFit { get; set; }

Property Value

bool

TextRotation

Text rotation in degrees: 0 to 90 rotates counter-clockwise, 91 to 180 means 1 to 90 degrees clockwise (Excel's encoding), and 255 stacks the letters vertically.

public int TextRotation { get; set; }

Property Value

int

VerticalAlignment

Vertical alignment. Defaults to Bottom.

public VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

WrapText

Wraps long text onto multiple lines inside the cell.

public bool WrapText { get; set; }

Property Value

bool