Class XlsxConditionalFormat
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
One conditional format rule of a sheet (Phase 202): what it checks, the cells it covers, its priority, and the format it applies. The object is live: its setters change the rule in the workbook. A rule's criteria are changed by adding a new rule and removing this one.
public sealed class XlsxConditionalFormat
- Inheritance
-
XlsxConditionalFormat
- Inherited Members
Properties
- AboveAverage
Gets whether an average rule formats values above the average (true) or below it.
- Bottom
Gets whether a top/bottom rule formats the lowest values.
- DataBarColor
Gets a data bar's colour; null for any other rule.
- Exists
Gets whether the sheet still has the rule.
- Format
Gets or sets the format the rule applies: a copy, so change it and set it back. Null for a colour scale, a data bar and an icon set, which draw instead. Setting one adds a new differential format to the style part.
- Formula1
Gets the rule's first formula as the file writes it (without
=); null for none.
- Formula2
Gets the rule's second formula; null for none.
- IconSet
Gets an icon set's name as Excel gives it (
3TrafficLights1when the file names none); null for any other rule.
- Kind
Gets what the rule checks.
- Operator
Gets a cell value rule's comparison; null for any other rule.
- Percent
Gets whether a top/bottom rule's rank is a percent.
- Priority
Gets the rule's priority: 1 is applied first. Changed with Reorder(XlsxConditionalFormat, int).
- Ranges
Gets the cells the rule covers.
- Rank
Gets a top/bottom rule's rank; null for any other rule.
- StopIfTrue
Gets or sets whether the rules after this one are not applied to a cell this one holds for.
- Text
Gets a text rule's text; null for any other rule.
- Thresholds
Gets a colour scale's, a data bar's or an icon set's thresholds (a colour scale's with their colours); null for any other rule.
- TimePeriod
Gets a dates-occurring rule's period; null for any other rule.
Methods
- ToString()
Returns the rule as a line: its cells, its kind and its priority.