Class CFRuleRecord

All Implemented Interfaces:
org.apache.poi.common.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.

  • Field Details

  • Constructor Details

  • Method Details

    • 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.
      Parameters:
      out - the stream to write to
    • copy

      public CFRuleRecord copy()
      Specified by:
      copy in interface org.apache.poi.common.Duplicatable
      Specified by:
      copy in class CFRuleBase
    • getGenericRecordType

      public HSSFRecordTypes getGenericRecordType()
      Specified by:
      getGenericRecordType in interface GenericRecord
      Specified by:
      getGenericRecordType in class Record