Show / Hide Table of Contents

Class ExcelFontXml

Xml access class for fonts

Inheritance
object
XmlHelper
StyleXmlHelper
ExcelFontXml
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OfficeOpenXml.Style.XmlAccess
Assembly: EPPlus.dll
Syntax
public sealed class ExcelFontXml : StyleXmlHelper

Properties

Bold

If the font is bold

Declaration
public bool Bold { get; set; }
Property Value
Type Description
bool

Charset

The character set for the font

Declaration
public int? Charset { get; set; }
Property Value
Type Description
int?
Remarks

The following values can be used for this property.

Color

Text color

Declaration
public ExcelColorXml Color { get; }
Property Value
Type Description
ExcelColorXml

Family

Font family

Declaration
public int Family { get; set; }
Property Value
Type Description
int

Italic

If the font is italic

Declaration
public bool Italic { get; set; }
Property Value
Type Description
bool

Name

The name of the font

Declaration
public string Name { get; set; }
Property Value
Type Description
string

Scheme

Font Scheme

Declaration
public string Scheme { get; }
Property Value
Type Description
string

Size

Font size

Declaration
public float Size { get; set; }
Property Value
Type Description
float

Strike

If the font is striked out

Declaration
public bool Strike { get; set; }
Property Value
Type Description
bool

UnderLine

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

Declaration
public bool UnderLine { get; set; }
Property Value
Type Description
bool

UnderLineType

If the font is underlined

Declaration
public ExcelUnderLineType UnderLineType { get; set; }
Property Value
Type Description
ExcelUnderLineType

VerticalAlign

Vertical aligned

Declaration
public string VerticalAlign { get; set; }
Property Value
Type Description
string

Methods

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

Set the font properties

Declaration
public void SetFromFont(string name, float size, bool bold = false, bool italic = false, bool underline = false, bool strikeout = false)
Parameters
Type Name Description
string name

Font family name

float size

Font size

bool bold
bool italic
bool underline
bool strikeout
In this article
Back to top Generated by DocFX