Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

XL.Font.SetBold

Turns on/off the bold font.

Component Version macOS Windows Linux Server iOS SDK
XL 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XL.Font.SetBold"; book; Font; Value )   More

Parameters

Parameter Description Example
book The reference to the workbook. Please use XL.LoadBook to load a file. $ref
Font The index of the font in the book to target. 0
Value The new setting. Pass 1 for bold and 0 for normal. 0

Result

Returns OK or error.

Description

Turns on/off the bold font.

Examples

Make a font bold:

MBS( "XL.Font.SetBold"; $book; $font10; 1 )

Create a format for bold font:

#create a font
Set Variable [$textFont; Value:MBS( "XL.Book.AddFont"; $book)]
Set Variable [$r; Value:MBS( "XL.Font.SetBold"; $book; $textfont; 1)]
#create format
Set Variable [$textFormat; Value:MBS( "XL.Book.AddFormat"; $book)]
Set Variable [$r; Value:MBS( "XL.Format.SetFont"; $book; $textFormat; $textFont)]

Writes a formula with bold font format:

# add a bold font based on another font
Set Variable [ $textFontBold ; Value: MBS( "XL.Book.AddFont"; $book; $textFont) ]
Set Variable [ $r ; Value: MBS( "XL.Font.SetBold"; $book; $textFontBold; 1) ]
# add format based on other format
Set Variable [ $dollarFormatBold ; Value: MBS( "XL.Book.AddFormat"; $book; $dollarFormat) ]
Set Variable [ $r ; Value: MBS( "XL.Format.SetFont"; $book; $dollarFormatBold; $textFontBold) ]
# use format
Set Variable [ $r ; Value: MBS( "XL.Sheet.CellWriteFormula"; $book; $sheet; 38; 4; "SUM(E16:E38)"; $dollarFormatBold) ]

See also

Created 18th August 2014, last changed 12nd November 2018


XL.Font.GetUnderline - XL.Font.SetColor

Feedback: Report problem or ask question.