XL.Font.GetName
---------------

Returns the name of the font.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [3.5](newinversion35.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Font.GetName"; Book; Font ) 

**MBS**( **"XL.Font.GetName";** /\* Returns the name of the font. \*/  
**$Book**; /\* The reference number for the workbook.e.g. $ref \*/   
**$Font**) /\* The index of the font in the book to target.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Book | The reference number for the workbook. | $ref |
| Font | The index of the font in the book to target. | 0 |

### Result

Returns value or error.

### Description

Returns the name of the font.  
### Examples

Add a font, set name and query it:

 Set Variable \[ $font ; Value: MBS ( "[XL.Book.AddFont](XLBookAddFont.md)"; $bookRef ) \]   
Set Variable \[ $r ; Value: MBS ( "[XL.Font.SetName](XLFontSetName.md)"; $bookRef ; $font ; "Helvetica" ) \]   
  
Show Custom Dialog \[ "font name" ; MBS ( "XL.Font.GetName"; $bookRef ; $font ) \]  
\# shows Helvetica   
### See also

- [XL.Book.AddFont](XLBookAddFont.md)
- [XL.Font.GetBold](XLFontGetBold.md)
- [XL.Font.GetSize](XLFontGetSize.md)
- [XL.Font.SetName](XLFontSetName.md)
- [XL.Font.SetSize](XLFontSetSize.md)
- [XL.Sheet.GetName](XLSheetGetName.md)

This function checks for a license.

Created 18th August 2014 , last changed 19th April 2020

  
[XL.Font.GetItalic](XLFontGetItalic.md) - [XL.Font.GetScript](XLFontGetScript.md)

[HTML Version](XLFontGetName.shtml)