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.MemberwiseClone()
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
Boolean

Charset

The character set for the font

Declaration
public int? Charset { get; set; }
Property Value
Type Description
Nullable<Int32>
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
Int32

Italic

If the font is italic

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

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
Single

Strike

If the font is striked out

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

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
Boolean

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, Single, Boolean, Boolean, Boolean, Boolean)

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

Single size

Font size

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