Method: Writexlsx::Worksheet#conditional_formatting
- Defined in:
- lib/write_xlsx/worksheet.rb
#conditional_formatting(*args) ⇒ Object
:call-seq:
conditional_formatting(cell_or_cell_range, )
Conditional formatting is a feature of Excel which allows you to apply a format to a cell or a range of cells based on a certain criteria.
2269 2270 2271 2272 2273 |
# File 'lib/write_xlsx/worksheet.rb', line 2269 def conditional_formatting(*args) cond_format = Package::ConditionalFormat.factory(self, *args) @cond_formats[cond_format.range] ||= [] @cond_formats[cond_format.range] << cond_format end |