Description

be already created Axlsx::ConditionalFormattingRule elements or hashes of options for automatic creation. If rules is a hash instead of an array, assume only one rule being added.

Examples:

This would apply formatting “1” to cells > 20, and formatting “2” to cells < 1

conditional_formatting.add_rules [
    { :type => :cellIs, :operator => :greaterThan, :formula => "20", :dxfId => 1, :priority=> 1 },
    { :type => :cellIs, :operator => :lessThan, :formula => "10", :dxfId => 2, :priority=> 2 } ]

Parameters:

  • rules (Array|Hash)

    the rules to apply, can be just one in hash form

add_rules is referenced in 0 repositories