Table of Contents

Class ExcelFont

Namespace
OfficeOpenXml.Style
Assembly
EPPlus.dll

Cell style Font

public sealed class ExcelFont : StyleBase
Inheritance
ExcelFont
Inherited Members

Properties

Bold

Font-bold

public bool Bold { get; set; }

Property Value

bool

Charset

The character set for the font

public int? Charset { get; set; }

Property Value

int?

Remarks

The following values can be used for this property

Color

Cell color

public ExcelColor Color { get; }

Property Value

ExcelColor

Family

Font family

public int Family { get; set; }

Property Value

int

Italic

Font-italic

public bool Italic { get; set; }

Property Value

bool

Name

The name of the font

public string Name { get; set; }

Property Value

string

Scheme

Scheme

public string Scheme { get; set; }

Property Value

string

Size

The Size of the font

public float Size { get; set; }

Property Value

float

Strike

Font-Strikeout

public bool Strike { get; set; }

Property Value

bool

UnderLine

Font-Underline

public bool UnderLine { get; set; }

Property Value

bool

UnderLineType

The underline style

public ExcelUnderLineType UnderLineType { get; set; }

Property Value

ExcelUnderLineType

VerticalAlign

Font-Vertical Align

public ExcelVerticalAlignmentFont VerticalAlign { get; set; }

Property Value

ExcelVerticalAlignmentFont

Methods

SetFromFont(string, float, bool, bool, bool, bool)

Set the font from a Font object

public void SetFromFont(string name, float size, bool bold = false, bool italic = false, bool underline = false, bool strikeout = false)

Parameters

name string

Font family name

size float

Font size

bold bool
italic bool
underline bool
strikeout bool