| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
XL.ConditionalFormat.Font
Returns the font for this format.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| XL | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "XL.ConditionalFormat.Font"; BookRef; ConditionalFormatRef ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| ConditionalFormatRef | The reference number for the conditional format. | $ConditionalFormat |
Result
Returns text or error.
Description
Returns the font for this format.If no font is defined, the result is empty.
Examples
Highlighting cells that begin With the given text:
# add conditional format
Set Variable [ $cFormat ; Value: MBS("XL.Book.AddConditionalFormat"; $book) ]
#
# set font to be folder
Set Variable [ $font ; Value: MBS("XL.ConditionalFormat.Font"; $book; $cFormat) ]
Set Variable [ $r ; Value: MBS("XL.Font.SetBold"; $book; $font; 1) ]
#
Set Variable [ $CF ; Value: MBS("XL.Sheet.AddConditionalFormatting"; $book; $sheet) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormating.AddRange"; $book; $CF; 2; 10; 1; 1) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormating.AddRule"; $book; $CF; 0 /* BeginWith */; $cFormat; "a") ]
Set Variable [ $cFormat ; Value: MBS("XL.Book.AddConditionalFormat"; $book) ]
#
# set font to be folder
Set Variable [ $font ; Value: MBS("XL.ConditionalFormat.Font"; $book; $cFormat) ]
Set Variable [ $r ; Value: MBS("XL.Font.SetBold"; $book; $font; 1) ]
#
Set Variable [ $CF ; Value: MBS("XL.Sheet.AddConditionalFormatting"; $book; $sheet) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormating.AddRange"; $book; $CF; 2; 10; 1; 1) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormating.AddRule"; $book; $CF; 0 /* BeginWith */; $cFormat; "a") ]
See also
- XL.Book.AddConditionalFormat
- XL.ConditionalFormating.AddRange
- XL.ConditionalFormating.AddRule
- XL.Font.SetBold
- XL.Sheet.AddConditionalFormatting
Release notes
- Version 15.5
- Fixed XL.ConditionalFormat.Font to return correct font index.
Example Databases
Blog Entries
Created 30th March 2024, last changed 31st March 2024