Blazor Spreadsheet Example - Conditional Formatting
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN |
|---|
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 14 |
| 15 |
| 16 |
| 17 |
| 18 |
| 19 |
| 20 |
| 21 |
| 22 |
| 23 |
| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
| 31 |
| 32 |
| 33 |
| 34 |
| 35 |
| 36 |
| 37 |
| 38 |
| 39 |
| 40 |
| 41 |
| 42 |
| 43 |
| 44 |
| 45 |
| 46 |
| 47 |
| 48 |
| 49 |
| Inventory List | ||||||||||||||||||||||||||||||||||||||||||||||
| Item Code | Item Name | Quantity | Purchase Price | Selling Price | Profit | Last Updated | Rating | |||||||||||||||||||||||||||||||||||||||
| AG940Z | Laser Printer | 144 | $169.50 | $172.00 | $2.50 | 5/25/2019 | 4.5 | |||||||||||||||||||||||||||||||||||||||
| BJ120K | Scientific Calculator | 116 | $21.80 | $23.00 | $1.20 | 7/28/2019 | 4 | |||||||||||||||||||||||||||||||||||||||
| BC120M | Wired Keyboard | 438 | $26.80 | $29.00 | $2.20 | 3/30/2020 | 4.25 | |||||||||||||||||||||||||||||||||||||||
| BS121L | Memory Card | 486 | $23.50 | $25.00 | $1.50 | 8/20/2019 | 3.5 | |||||||||||||||||||||||||||||||||||||||
| BU121K | Coffee Maker | 176 | $56.50 | $59.00 | $2.50 | 2/2/2020 | 4.5 | |||||||||||||||||||||||||||||||||||||||
| BD121M | Table Lamp | 0 | $22.50 | $25.00 | $2.50 | 11/11/2019 | 5 | |||||||||||||||||||||||||||||||||||||||
| AT992X | Document Scanner | 116 | $175.00 | $177.00 | $2.00 | 4/13/2019 | 4.75 | |||||||||||||||||||||||||||||||||||||||
| AP992Z | Gaming Headset | 58 | $32.00 | $35.00 | $3.00 | 2/14/2020 | 4.4 | |||||||||||||||||||||||||||||||||||||||
| AW920X | Laptop Bag | 232 | $18.90 | $19.00 | $0.10 | 6/10/2019 | 3.9 | |||||||||||||||||||||||||||||||||||||||
| AQ920Z | Table Fan | 405 | $33.90 | $35.00 | $1.10 | 5/28/2019 | 3.75 | |||||||||||||||||||||||||||||||||||||||
| AE940X | Electric Mop | 47 | $153.50 | $155.00 | $1.50 | 12/18/2019 | 3.9 | |||||||||||||||||||||||||||||||||||||||
| UI152C | Smart LED TV | 232 | $201.25 | $204.00 | $2.75 | 3/13/2020 | 4.35 | |||||||||||||||||||||||||||||||||||||||
| UD152V | Robotic Vacuum Cleaner | 210 | $182.25 | $185.00 | $2.75 | 8/26/2019 | 4 | |||||||||||||||||||||||||||||||||||||||
| BK120L | Gaming Mouse | 225 | $34.80 | $38.00 | $3.20 | 1/12/2020 | 4.2 | |||||||||||||||||||||||||||||||||||||||
| UF162V | Chair | 373 | $104.80 | $108.00 | $3.20 | 4/12/2019 | 3.25 | |||||||||||||||||||||||||||||||||||||||
| UR162C | Welding Gloves | 216 | $19.00 | $21.00 | $2.00 | 11/22/2019 | 3.85 | |||||||||||||||||||||||||||||||||||||||
This sample demonstrates the conditional formatting capabilities of Blazor Spreadsheet using a inventory dataset. It highlights how you can outline cells, group related data, and improve visual structure, making it easier to organize and present information clearly.
The Blazor Spreadsheet conditional formatting allows you to dynamically format cells based on their values, making it easier to analyze and visualize data patterns. To enable conditional formatting, set the AllowConditionalFormat property to true.
Key Conditional Formatting Options:
- Highlight Cells Rules - Format cells based on conditions such as Greater Than, Less Than, Between, Equal To, Contains Text, A Date Occurring, and Duplicate Values.
- Top/Bottom Rules - Highlight values such as Top 10 Items, Top 10%, Bottom 10 Items, Bottom 10%, Above Average, and Below Average.
- Data Bars - Display data bars inside cells to visually compare numeric values.
- Color Scales - Apply gradient colors to represent value distribution across a range.
- Icon Sets - Use icons such as arrows, shapes, and indicators to represent value trends.
You can apply conditional formatting rules programmatically using the ConditionalFormatAsync method to add rules with specific formatting criteria. To remove existing rules, use the ClearConditionalFormatsAsync method, which can clear formatting from a specific range or the entire active worksheet.
In this demo, you can apply various conditional formatting rules to the product inventory dataset to enhance data visualization and analysis. Select cells and choose formatting rules from the Conditional Formatting dropdown in the ribbon to automatically format cells based on specific conditions, ensuring quick identification of trends and important values.
For more detailed information about conditional formatting, refer to the conditional formatting documentation.
Looking for the full Blazor Spreadsheet Editor component overview, features, pricing, and documentation? Visit the Blazor Spreadsheet Editor component page.