|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SheetConditionalFormatting
The 'Conditional Formatting' facet of Sheet
| Method Summary | |
|---|---|
int |
addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule rule)
Add a new Conditional Formatting to the sheet. |
int |
addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule[] cfRules)
Add a new Conditional Formatting set to the sheet. |
int |
addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule rule1,
ConditionalFormattingRule rule2)
Add a new Conditional Formatting consisting of two rules. |
int |
addConditionalFormatting(ConditionalFormatting cf)
Adds a copy of a ConditionalFormatting object to the sheet |
ConditionalFormattingRule |
createConditionalFormattingRule(byte comparisonOperation,
java.lang.String formula)
Create a conditional formatting rule that compares a cell value to a formula calculated result, using an operator * |
ConditionalFormattingRule |
createConditionalFormattingRule(byte comparisonOperation,
java.lang.String formula1,
java.lang.String formula2)
A factory method allowing to create a conditional formatting rule with a cell comparison operator |
ConditionalFormattingRule |
createConditionalFormattingRule(java.lang.String formula)
Create a conditional formatting rule based on a Boolean formula. |
ConditionalFormatting |
getConditionalFormattingAt(int index)
Gets Conditional Formatting object at a particular index |
int |
getNumConditionalFormattings()
|
void |
removeConditionalFormatting(int index)
Removes a Conditional Formatting object by index |
| Method Detail |
|---|
int addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule rule)
regions - - list of rectangular regions to apply conditional formatting rulesrule - - the rule to apply
int addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule rule1,
ConditionalFormattingRule rule2)
regions - - list of rectangular regions to apply conditional formatting rulesrule1 - - the first rulerule2 - - the second rule
int addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule[] cfRules)
regions - - list of rectangular regions to apply conditional formatting rulescfRules - - set of up to three conditional formatting rules
int addConditionalFormatting(ConditionalFormatting cf)
This method could be used to copy ConditionalFormatting object from one sheet to another. For example:
ConditionalFormatting cf = sheet.getConditionalFormattingAt(index); newSheet.addConditionalFormatting(cf);
cf - the Conditional Formatting to clone
ConditionalFormattingRule createConditionalFormattingRule(byte comparisonOperation,
java.lang.String formula1,
java.lang.String formula2)
The created conditional formatting rule compares a cell value
to a formula calculated result, using the specified operator.
The type of the created condition is ConditionalFormattingRule.CONDITION_TYPE_CELL_VALUE_IS
comparisonOperation - - MUST be a constant value from
ComparisonOperator:
formula1 - - formula for the valued, compared with the cellformula2 - - second formula (only used with
ComparisonOperator.BETWEEN) and ComparisonOperator.NOT_BETWEEN operations)
ConditionalFormattingRule createConditionalFormattingRule(byte comparisonOperation,
java.lang.String formula)
The type of the created condition is ConditionalFormattingRule.CONDITION_TYPE_CELL_VALUE_IS
comparisonOperation - MUST be a constant value from
ComparisonOperator except BETWEEN and NOT_BETWEENformula - the formula to determine if the conditional formatting is appliedConditionalFormattingRule createConditionalFormattingRule(java.lang.String formula)
The type of the created format condition is ConditionalFormattingRule.CONDITION_TYPE_FORMULA
formula - the formula to evaluate. MUST be a Boolean function.ConditionalFormatting getConditionalFormattingAt(int index)
index - 0-based index of the Conditional Formatting object to fetch
null if not found
java.lang.IllegalArgumentException - if the index is outside of the allowable range (0 ... numberOfFormats-1)int getNumConditionalFormattings()
void removeConditionalFormatting(int index)
index - 0-based index of the Conditional Formatting object to remove
java.lang.IllegalArgumentException - if the index is outside of the allowable range (0 ... numberOfFormats-1)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||