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


Sets the border style.

Component Version macOS Windows Linux Server iOS SDK
XL 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XL.ConditionalFormat.SetBorder"; bookRef; ConditionalFormatRef; Value )   More


Parameter Description Example
bookRef The reference to the workbook. Please use XL.LoadBook to load a file. $ref
ConditionalFormatRef The reference number for the conditional format. $ConditionalFormat
Value The border style.
Default value is 1 for thin.


Returns OK or error.


Sets the border style.
Available styles:
0 None
1 Thin
2 Medium
3 Dashed
4 Dotted
5 Thick
6 Double
7 Hair
8 Medium dashed
9 Dash dot
10 Medium dash dot
11 Dash Dot Dot
12 Medium dash dot dot
13 Slant dash dot


Create border format:

Set Variable [$f; Value:MBS( "XL.Sheet.AddConditionalFormatting"; $book)]
Set Variable [$r; Value:MBS( "XL.ConditionalFormat.SetBorder"; $book; $f; 1) // thin ]

See also

Created 30th March 2024, last changed 11st May 2024

XL.ConditionalFormat.GetPatternForegroundColor - XL.ConditionalFormat.SetBorderBottom