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
Fill
Background fill settings.
public FillOptions Fill { get; }
Property Value
Font
Font settings (bold, italic, colour, size, name).
public FontOptions Font { get; }
Property Value
HorizontalAlignment
Horizontal alignment. Defaults to General.
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Indent
Indent level (each level is about three characters). 0 to 250.
public int Indent { get; set; }
Property Value
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
Protection
Cell protection flags; they only take effect once the sheet is protected.
public ProtectionOptions Protection { get; }
Property Value
ShrinkToFit
Shrinks the font so the text fits the column width.
public bool ShrinkToFit { get; set; }
Property Value
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
VerticalAlignment
Vertical alignment. Defaults to Bottom.
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
WrapText
Wraps long text onto multiple lines inside the cell.
public bool WrapText { get; set; }