Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xssf.usermodel
Class XSSFSheetConditionalFormatting

    java.lang.Object
      org.apache.poi.xssf.usermodel.XSSFSheetConditionalFormatting

All Implemented Interfaces:
  org.apache.poi.ss.usermodel.SheetConditionalFormatting

    public class XSSFSheetConditionalFormatting

extends java.lang.Object
implements org.apache.poi.ss.usermodel.SheetConditionalFormatting

Author:
  Yegor Kozlov

Method Summary
`int` | `addConditionalFormatting(org.apache.poi.ss.util.CellRangeAddress[] regions, org.apache.poi.ss.usermodel.ConditionalFormattingRule rule1)`
`int` | `addConditionalFormatting(org.apache.poi.ss.util.CellRangeAddress[] regions, org.apache.poi.ss.usermodel.ConditionalFormattingRule[] cfRules)`
`int` | `addConditionalFormatting(org.apache.poi.ss.util.CellRangeAddress[] regions, org.apache.poi.ss.usermodel.ConditionalFormattingRule rule1, org.apache.poi.ss.usermodel.ConditionalFormattingRule rule2)`
`int` | `addConditionalFormatting(org.apache.poi.ss.usermodel.ConditionalFormatting cf)` Adds a copy of HSSFConditionalFormatting object to the sheet
`org.apache.poi.ss.usermodel.ConditionalFormattingRule` | `createConditionalFormattingRule(byte comparisonOperation, java.lang.String formula)`
`org.apache.poi.ss.usermodel.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 TODO - formulas containing cell references are currently not parsed properly
`org.apache.poi.ss.usermodel.ConditionalFormattingRule` | `createConditionalFormattingRule(java.lang.String formula)` A factory method allowing to create a conditional formatting rule with a formula.
`org.apache.poi.ss.usermodel.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

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createConditionalFormattingRule

    public org.apache.poi.ss.usermodel.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

  TODO - formulas containing cell references are currently not parsed properly

  Specified by:
    `createConditionalFormattingRule` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`
  Parameters:
    `comparisonOperation` - - a constant value from ``CFRuleRecord.ComparisonOperator``:

    - BETWEEN
    - NOT_BETWEEN
    - EQUAL
    - NOT_EQUAL
    - GT
    - LT
    - GE
    - LE
    `formula1` - - formula for the valued, compared with the cell
    `formula2` - - second formula (only used with `ComparisonOperator.BETWEEN`) and `ComparisonOperator.NOT_BETWEEN` operations)

### createConditionalFormattingRule

    public org.apache.poi.ss.usermodel.ConditionalFormattingRule createConditionalFormattingRule(byte comparisonOperation,
                                                                                                 java.lang.String formula)

  Specified by:
    `createConditionalFormattingRule` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`

### createConditionalFormattingRule

    public org.apache.poi.ss.usermodel.ConditionalFormattingRule createConditionalFormattingRule(java.lang.String formula)

  A factory method allowing to create a conditional formatting rule with a formula.

  Specified by:
    `createConditionalFormattingRule` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`
  Parameters:
    `formula` - - formula for the valued, compared with the cell

### addConditionalFormatting

    public int addConditionalFormatting(org.apache.poi.ss.util.CellRangeAddress[] regions,
                                        org.apache.poi.ss.usermodel.ConditionalFormattingRule[] cfRules)

  Specified by:
    `addConditionalFormatting` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`

### addConditionalFormatting

    public int addConditionalFormatting(org.apache.poi.ss.util.CellRangeAddress[] regions,
                                        org.apache.poi.ss.usermodel.ConditionalFormattingRule rule1)

  Specified by:
    `addConditionalFormatting` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`

### addConditionalFormatting

    public int addConditionalFormatting(org.apache.poi.ss.util.CellRangeAddress[] regions,
                                        org.apache.poi.ss.usermodel.ConditionalFormattingRule rule1,
                                        org.apache.poi.ss.usermodel.ConditionalFormattingRule rule2)

  Specified by:
    `addConditionalFormatting` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`

### addConditionalFormatting

    public int addConditionalFormatting(org.apache.poi.ss.usermodel.ConditionalFormatting cf)

  Adds a copy of HSSFConditionalFormatting object to the sheet

  This method could be used to copy HSSFConditionalFormatting object from one sheet to another. For example:

       HSSFConditionalFormatting cf = sheet.getConditionalFormattingAt(index);
       newSheet.addConditionalFormatting(cf);

  Specified by:
    `addConditionalFormatting` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`
  Parameters:
    `cf` - HSSFConditionalFormatting object
  Returns:
    index of the new Conditional Formatting object

### getConditionalFormattingAt

    public org.apache.poi.ss.usermodel.ConditionalFormatting getConditionalFormattingAt(int index)

  gets Conditional Formatting object at a particular index

  Specified by:
    `getConditionalFormattingAt` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`
  Parameters:
    `index` - of the Conditional Formatting object to fetch
  Returns:
    Conditional Formatting object

### getNumConditionalFormattings

    public int getNumConditionalFormattings()

  Specified by:
    `getNumConditionalFormattings` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`
  Returns:
    number of Conditional Formatting objects of the sheet

### removeConditionalFormatting

    public void removeConditionalFormatting(int index)

  removes a Conditional Formatting object by index

  Specified by:
    `removeConditionalFormatting` in interface `org.apache.poi.ss.usermodel.SheetConditionalFormatting`
  Parameters:
    `index` - of a Conditional Formatting object to remove

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD