Show / Hide Table of Contents

Class ExcelFont

Cell style Font

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

Properties

Bold

Font-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

Cell color

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

Family

Font family

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

Italic

Font-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

Scheme

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

Size

The Size of the font

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

Strike

Font-Strikeout

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

UnderLine

Font-Underline

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

UnderLineType

The underline style

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

VerticalAlign

Font-Vertical Align

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

Methods

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

Set the font from a Font object

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