Class ExcelFont
Cell style Font
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
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 |
|---|---|
| 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
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 |
|---|---|
| Int32 |
Italic
Font-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
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 |
|---|---|
| Single |
Strike
Font-Strikeout
Declaration
public bool Strike { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
UnderLine
Font-Underline
Declaration
public bool UnderLine { get; set; }
Property Value
| Type | Description |
|---|---|
| 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 |
|---|---|---|
| String | name | Font family name |
| Single | size | Font size |
| Boolean | bold | |
| Boolean | italic | |
| Boolean | underline | |
| Boolean | strikeout |