This sample demonstrates about the conditional formatting features like highlight cell rules, data bars, color scales, icon sets, and formula based conditional formatting by using the inventory list details.
This feature allows you to format a cell or range of cells based on the conditions applied. You can enable or disable conditional formats by using the allowConditionalFormat property.
In this sample, we have applied conditional formatting color scales in Quantity column, data bars in Purchase price and selling price column, highlight cell rules in last updated column, rating icon sets applied in rating column, and formula-based conditional formatting in the rating column by using the conditionalFormat method and conditionalFormats property in sheets model.
In the Profit column, we have applied conditional formatting custom format. Using the support you can set cell styles like color, background color, font style, font weight and underline etc.
This sample also demonstrates the Text Overflow feature. The profit calculations in cell `F20:F23` contain lengthy text that extends across adjacent empty cells, showcasing text overflow behavior and improving content visibility without requiring column resizing.
Key Features
- Conditional formatting - Automatically apply visual formatting to cells and ranges based on predefined rules and data conditions.
- Highlight cell rules - Identify important values using conditions such as greater than, less than, between, duplicates, unique values, and text-based criteria.
- Data bars - Display in-cell data bars to visually compare numeric values and identify trends across a range.
- Color scales - Use two-color and three-color gradients to highlight value distributions and emphasize data patterns.
- Icon sets - Represent data states and performance indicators using visual icons such as arrows, ratings, symbols, and traffic lights.
- Custom formatting styles - Apply customized font, color, background, and text styling based on conditional formatting rules.
- Dynamic data visualization - Improve data analysis and decision-making by automatically updating formatting when worksheet values change.
- Formula-based conditional formatting - Use custom formulas to apply formatting when specified conditions evaluate to TRUE.
- Text Overflow - Display long text across adjacent empty cells without truncation.
Learn how to apply conditional formatting rules such as highlight cell rules, data bars, color scales, icon sets, and formula-based conditional formatting as demonstrated in this sample.
Documentation Links
More Resource