| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
XL.ConditionalFormating.AddRange
Adds a range to these conditional formatting rules.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| XL | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "XL.ConditionalFormating.AddRange"; BookRef; ConditionalFormattingRef; rowFirst; rowLast; ColFirst; ColLast ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| ConditionalFormattingRef | The reference number for the conditional formatting. | $ConditionalFormatting |
| rowFirst | The first row for the area. First row has index 0. | $row |
| rowLast | The last row for the area. First row has index 0. | $row |
| ColFirst | The first column for the area. First column has index 0. | $column |
| ColLast | The last column for the area. First column has index 0. | $column+1 |
Result
Returns OK or error.
Description
Adds a range to these conditional formatting rules.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.ConditionalFormat.Font
- XL.ConditionalFormating.Add2ColorScaleRule
- XL.ConditionalFormating.AddOpNumRule
- XL.ConditionalFormating.AddOpStrRule
- XL.ConditionalFormating.AddRule
- XL.ConditionalFormating.AddTopRule
- XL.Font.SetBold
- XL.Sheet.AddConditionalFormatting
Example Databases
Blog Entries
Created 30th March 2024, last changed 31st March 2024
XL.ConditionalFormating.AddOpStrRule - XL.ConditionalFormating.AddRule