Conditional Formatting Rules Manager
- 2 minutes to read
The Conditional Formatting Rules Manager lists all conditional formatting rules contained in a specific document area and allows end-users to create new rules, as well as edit and remove the existing ones.
You can invoke the dialog by clicking the Manage Rules… item in the Conditional Formatting drop-down menu. Add the Styles Ribbon page group to the SpreadsheetControl to enable this menu. See the Getting Started topic for a demonstration on how to provide a Ribbon UI for the SpreadsheetControl.
The dialog shows the following information on each conditional formatting rule:
Rule (applied in order shown)
Shows the formatting rule description.
Shows the resulting appearance of the cell that meets the rule criterion.
Displays the cell range to which the conditional formatting is applied. End-users can change the cell range by typing the cell reference in the corresponding dialog cell or selecting it directly in the worksheet.
Stop if True
A check box indicating whether rules lower in precedence are applied if the current rule condition is true. Note that this option is unavailable for the rules that format cells using data bars, color scale or icon sets.
The formatting rules are shown in order of precedence (the priority is determined by the ConditionalFormatting.Priority property). A new formatting rule is automatically added to the top of the list and has the highest precedence. End-users can change the precedence of a desired formatting rule in the list using the Up and Down buttons.
The Show formatting rules for list allows end-users to select the part of the document (current selection, worksheet, pivot table, table, etc. ) whose formatting rules should be displayed.
Clicking the New Rule... button invokes the New Formatting Rule Dialog which allows end-users to specify a new formatting rule's settings.
Clicking the Edit Rule... button allows you to modify an existing formatting rule using the Edit Formatting Rule dialog.
An end-user can click the Delete Rule button or press Delete key to remove the selected formatting rule.
To create the conditional formatting rules using the Spreadsheet API, use the corresponding methods of the ConditionalFormattingCollection collection. For more information, refer to the examples in the Conditional Formatting section.