Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
XL.Sheet.AddConditionalFormatting
Adds a conditional formatting rules to the sheet.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XL | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
bookRef | The reference to the workbook. Please use XL.LoadBook to load a file. | $ref |
sheetIndex | The index of the sheet. This number ranges from 0 to XL.Book.SheetCount-1. | 0 |
Result
Returns conditional formatting index number or error.
Description
Adds a conditional formatting rules to the sheet.Requires LibXL 4.1 and only for xlsx files.
Examples
Highlighting alternating rows:
# add conditional format
Set Variable [ $cFormat ; Value: MBS("XL.Book.AddConditionalFormat"; $book) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormat.SetFillPattern"; $book; $cFormat; 1 /* solid */) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormat.SetPatternBackgroundColor"; $book; $cFormat; MBS("XL.Color.Pack"; $book; 240; 240; 240)) ]
#
Set Variable [ $CF ; Value: MBS("XL.Sheet.addConditionalFormatting"; $book; $sheet) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormating.AddRange"; $book; $CF; 4; 20; 1; 10) ]
Set Variable [ $r ; Value: MBS("XL.ConditionalFormating.AddRule"; $book; $CF; 6 /* Expression */; $cFormat; "=MOD(ROW(),2)=0") ]
See also
- XL.Book.SheetCount
- XL.ConditionalFormat.SetBorder
- XL.ConditionalFormat.SetBorderBottom
- XL.ConditionalFormat.SetBorderLeft
- XL.ConditionalFormat.SetBorderRight
- XL.ConditionalFormat.SetFillPattern
- XL.ConditionalFormating.AddOpNumRule
- XL.ConditionalFormating.AddRange
- XL.ConditionalFormating.AddRule
- XL.LoadBook
Release notes
- Version 14.2
- Added new XL functions to create conditional formatting including XL.Book.AddConditionalFormat and XL.Sheet.AddConditionalFormatting.
Blog Entries
- Neues MBS Plugin 14.2 für Claris FileMaker
- MBS Plugin 14.2 for Claris FileMaker
- Conditional Formatting in Excel exports from FileMaker
- MBS FileMaker Plugin, version 14.2pr1
Created 30th March 2024, last changed 31st March 2024
