Skip to content

Use the Spreadsheet Document API to apply conditional formatting to a cell range.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/spreadsheet-document-api-apply-conditional-formatting-to-cell-range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spreadsheet Document API - Apply Conditional Formatting to a Cell Range

This example illustrates how to get started with conditional formatting that can be applied to cells that match a certain condition specified by a conditional formatting rule.

In particular, this sample demonstrates how to use the Spreadsheet Document API to create the following types of conditional formatting rules:

  • a rule that formats cells whose values are above or below the average;
  • a rule that highlights cells whose values are between or not between two specified values;
  • a rule that formats top or bottom-ranked values;
  • a rule that highlights cells containing the given text;
  • a rule that formats unique or duplicate values, blank cells, and formula errors;
  • a rule that highlights cells containing dates in the specified time period;
  • a rule that formats cells whose values meet the condition expressed by the relational operator;
  • a rule that uses a formula to determine which cells to format;
  • a two-color scale conditional formatting rule;
  • a three-color scale conditional formatting rule;
  • a data bar conditional formatting rule;
  • an icon set conditional formatting rule.

Note

The Universal Subscription or an additional Office File API Subscription is required to use this example in production code. Please refer to the following page for pricing information: DevExpress Subscription

Files to Review

C# Visual Basic
BusinessObjects.cs BusinessObjects.vb
Form1.cs Form1.vb
Program.cs Program.vb
ConditionalFormatting.cs ConditionalFormatting.vb

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)