XL.ConditionalFormat.SetFillPattern
-----------------------------------

Sets the fill pattern.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [14.2](newinversion142.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.ConditionalFormat.SetFillPattern"; BookRef; ConditionalFormatRef; Value ) 

**MBS**( **"XL.ConditionalFormat.SetFillPattern";** /\* Sets the fill pattern. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$ConditionalFormatRef**; /\* The reference number for the conditional format.e.g. $ConditionalFormat \*/   
**$Value**) /\* The new pattern.e.g. 3 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| ConditionalFormatRef | The reference number for the conditional format. | $ConditionalFormat |
| Value | The new pattern. | 3 |

### Result

Returns OK or error.

### Description

Sets the fill pattern.  
  
| None | 0 |
|---|--:|
| Solid | 1 |
| 50% Gray | 2 |
| 75% Gray | 3 |
| 25% Gray | 4 |
| Horizontal Stripes | 5 |
| Vertical Stripes | 6 |
| Reverse Diagonal Stripes | 7 |
| Diagonal Stripes | 8 |
| Diagonal Cross Hatch | 9 |
| Thick Diagonal Stripe | 9 |
| Thin Horizontal Stripe | 11 |
| Thin Vertical Stripe | 12 |
| Thin Reverse Diagonal Stripe | 13 |
| Thin Diagonal Stripe | 14 |
| Thin Horizontal Cross Hatch | 15 |
| Thin Diagonal Cross Hatch | 16 |
| Gray 12P5 | 17 |
| Gray 6P25 | 18 |

  
see table of fill patterns here:  
<http://www.libxl.com/format.html#borderStyleTable#setFillPattern>  
### See also

- [XL.Book.AddConditionalFormat](XLBookAddConditionalFormat.md)
- [XL.ConditionalFormat.GetFillPattern](XLConditionalFormatGetFillPattern.md)
- [XL.ConditionalFormat.SetBorderLeft](XLConditionalFormatSetBorderLeft.md)
- [XL.ConditionalFormating.AddOpNumRule](XLConditionalFormatingAddOpNumRule.md)
- [XL.ConditionalFormating.AddRule](XLConditionalFormatingAddRule.md)
- [XL.Sheet.AddConditionalFormatting](XLSheetAddConditionalFormatting.md)

### Example Databases

- [XL/Conditional Formatting](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/XL/Conditional%20Formatting.shtml#3ScriptAnchor_)

### Blog Entries

- [Conditional Formatting in Excel exports from FileMaker](https://www.mbsplugins.de/archive/2024-04-08/Conditional_Formatting_in_Exce/monkeybreadsoftware_blog_filemaker)

Created 30th March 2024 , last changed 30th March 2024

  
[XL.ConditionalFormat.SetCustomNumFormat](XLConditionalFormatSetCustomNumFormat.md) - [XL.ConditionalFormat.SetNumFormat](XLConditionalFormatSetNumFormat.md)

[HTML Version](XLConditionalFormatSetFillPattern.shtml)