Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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

Example Databases

Blog Entries

This function checks for a license.

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


XL.Font.GetUnderline - XL.Font.SetColor