- Document Solutions for Excel, Java Edition Overview
- Key Features
- Getting Started
-
Features
- Worksheet
- Workbook
- Comments
- Hyperlinks
- Sort
- Filter
- Group
- Conditional Formatting
- Data Validations
- Data Binding
- Import Data
- Digital Signatures
- Formulas
- Custom Functions
- Shapes
- Document Properties
- Styles
- Form Controls
- Barcodes
- Themes and Colors
- Chart
- Table
- Pivot Table
- Pivot Chart
- Sparkline
- Slicer
- Print Settings
- Logging
- Defined Names
- Templates
- File Operations
- Use JDK 8 Date Time API
- Document Solutions Data Viewer
- API Reference
- Release Notes
Conditional Formatting
DsExcel Java enables users to highlight useful information in rows or columns of a worksheet with the help of conditional formatting rules for a single cell or a range of cells based on cell values.
In case the format condition is same as the cell value, it is assumed to be true and the cell is formatted as per the applied rule.
For instance, let's take an example of a scenario wherein you want to show a specific cell or a cell range in italic font style if the cell value is lower than 90. For achieving this, you can apply a conditional formatting rule that changes the cell format if the desired condition is met. Note that the other cells will be displayed in the default format of the cells in the spreadsheet i.e. general format.
You can apply conditional formatting in individual cells or a range of cells using rules or conditional operators. The set of conditional formatting rules for a range can be represented using the methods of the IRange interface.
Shared below is a list of conditional formatting rules that can be applied in a worksheet.
- Cell Value Rule
- Date Occurring Rule
- Average Rule
- Color Scale Rule
- Data Bar Rule
- Top Bottom Rule
- Unique Rule
- Icon Sets Rule
- Expression Rule
If you want to delete the formatting rule applied to the cell range in a worksheet, you can do it by using the delete method of IFormatCondition interface.