Table of Contents

Class ExcelStyle

Namespace
OfficeOpenXml.Style
Assembly
EPPlus.dll

Toplevel class for cell styling

public sealed class ExcelStyle : StyleBase
Inheritance
ExcelStyle
Inherited Members

Properties

Border

Border

public Border Border { get; set; }

Property Value

Border

Fill

Fill Styling

public ExcelFill Fill { get; set; }

Property Value

ExcelFill

Font

Font styling

public ExcelFont Font { get; set; }

Property Value

ExcelFont

Hidden

If true the formula is hidden when the sheet is protected. Protection

public bool Hidden { get; set; }

Property Value

bool

HorizontalAlignment

The horizontal alignment in the cell

public ExcelHorizontalAlignment HorizontalAlignment { get; set; }

Property Value

ExcelHorizontalAlignment

Indent

The margin between the border and the text

public int Indent { get; set; }

Property Value

int

JustifyLastLine

If the cells justified or distributed alignment should be used on the last line of text.

public bool JustifyLastLine { get; set; }

Property Value

bool

Locked

If true the cell is locked for editing when the sheet is protected Protection

public bool Locked { get; set; }

Property Value

bool

Numberformat

Numberformat

public ExcelNumberFormat Numberformat { get; set; }

Property Value

ExcelNumberFormat

QuotePrefix

If true the cell has a quote prefix, which indicates the value of the cell is text.

public bool QuotePrefix { get; set; }

Property Value

bool

ReadingOrder

Readingorder

public ExcelReadingOrder ReadingOrder { get; set; }

Property Value

ExcelReadingOrder

ShrinkToFit

Shrink the text to fit

public bool ShrinkToFit { get; set; }

Property Value

bool

TextRotation

Text orientation in degrees. Values range from 0 to 180 or 255. Setting the rotation to 255 will align text vertically.

public int TextRotation { get; set; }

Property Value

int

VerticalAlignment

The vertical alignment in the cell

public ExcelVerticalAlignment VerticalAlignment { get; set; }

Property Value

ExcelVerticalAlignment

WrapText

Wrap the text

public bool WrapText { get; set; }

Property Value

bool

XfId

The index in the style collection

public int XfId { get; set; }

Property Value

int

Methods

SetTextVertical()

Makes the text vertically. This is the same as setting TextRotation to 255.

public void SetTextVertical()