Table of Contents

Class ExcelFontXml

Namespace
OfficeOpenXml.Style.XmlAccess
Assembly
EPPlus.dll

Xml access class for fonts

public sealed class ExcelFontXml : StyleXmlHelper
Inheritance
ExcelFontXml
Inherited Members

Properties

Bold

If the font is 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

Text color

public ExcelColorXml Color { get; }

Property Value

ExcelColorXml

Family

Font family

public int Family { get; set; }

Property Value

int

Italic

If the font is italic

public bool Italic { get; set; }

Property Value

bool

Name

The name of the font

public string Name { get; set; }

Property Value

string

Scheme

Font Scheme

public string Scheme { get; }

Property Value

string

Size

Font size

public float Size { get; set; }

Property Value

float

Strike

If the font is striked out

public bool Strike { get; set; }

Property Value

bool

UnderLine

If the font is underlined. When set to true a the text is underlined with a single line

public bool UnderLine { get; set; }

Property Value

bool

UnderLineType

If the font is underlined

public ExcelUnderLineType UnderLineType { get; set; }

Property Value

ExcelUnderLineType

VerticalAlign

Vertical aligned

public string VerticalAlign { get; set; }

Property Value

string

Methods

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

Set the font properties

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