Class ExcelFont
Cell style Font
Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.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 | 
|---|---|
| System.Boolean | 
Charset
The character set for the font
Declaration
public int? Charset { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.Int32> | 
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 | 
|---|---|
| System.Int32 | 
Italic
Font-italic
Declaration
public bool Italic { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Name
The name of the font
Declaration
public string Name { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Scheme
Scheme
Declaration
public string Scheme { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Size
The Size of the font
Declaration
public float Size { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Single | 
Strike
Font-Strikeout
Declaration
public bool Strike { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
UnderLine
Font-Underline
Declaration
public bool UnderLine { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
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, Single, Boolean, Boolean, Boolean, Boolean)
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 | 
|---|---|---|
| System.String | name | Font family name  | 
      
| System.Single | size | Font size  | 
      
| System.Boolean | bold | |
| System.Boolean | italic | |
| System.Boolean | underline | |
| System.Boolean | strikeout |