Class CFRuleRecord

  • All Implemented Interfaces:
    Duplicatable, GenericRecord

    public final class CFRuleRecord
    extends CFRuleBase
    Conditional Formatting Rule Record (0x01B1).

    This is for the older-style Excel conditional formattings, new-style (Excel 2007+) also make use of CFRule12Record for their rules.

    • Method Detail

      • create

        public static CFRuleRecord create​(HSSFSheet sheet,
                                          String formulaText)
        Creates a new comparison operation rule
        Parameters:
        sheet - the sheet
        formulaText - the formula text
        Returns:
        a new comparison operation rule
      • create

        public static CFRuleRecord create​(HSSFSheet sheet,
                                          byte comparisonOperation,
                                          String formulaText1,
                                          String formulaText2)
        Creates a new comparison operation rule
        Parameters:
        sheet - the sheet
        comparisonOperation - the comparison operation
        formulaText1 - the first formula text
        formulaText2 - the second formula text
        Returns:
        a new comparison operation rule
      • getSid

        public short getSid()
        Description copied from class: Record
        return the non static version of the id for this record.
        Specified by:
        getSid in class Record
        Returns:
        he id for this record
      • serialize

        public void serialize​(LittleEndianOutput out)
        called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.
        Specified by:
        serialize in class StandardRecord
        Parameters:
        out - the stream to write to