Class ExcelFontXml
Xml access class for fonts
Inherited Members
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 |