|
virtual void | set_color (color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue)=0 |
|
virtual void | set_formula (std::string_view formula)=0 |
|
virtual void | set_condition_type (condition_type_t type)=0 |
|
virtual void | set_date (condition_date_t date)=0 |
|
virtual void | commit_condition ()=0 |
|
virtual void | set_icon_name (std::string_view name)=0 |
|
virtual void | set_databar_gradient (bool gradient)=0 |
|
virtual void | set_databar_axis (databar_axis_t axis)=0 |
|
virtual void | set_databar_color_positive (color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue)=0 |
|
virtual void | set_databar_color_negative (color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue)=0 |
|
virtual void | set_min_databar_length (double length)=0 |
|
virtual void | set_max_databar_length (double length)=0 |
|
virtual void | set_show_value (bool show)=0 |
|
virtual void | set_iconset_reverse (bool reverse)=0 |
|
virtual void | set_xf_id (size_t xf)=0 |
|
virtual void | set_operator (condition_operator_t condition_type)=0 |
|
virtual void | set_type (conditional_format_t type)=0 |
|
virtual void | commit_entry ()=0 |
|
virtual void | set_range (std::string_view range)=0 |
|
virtual void | set_range (row_t row_start, col_t col_start, row_t row_end, col_t col_end)=0 |
|
virtual void | commit_format ()=0 |
|
This is an optional interface to import conditional formatting.
In general, a single conditional format consists of:
- a cell range the format is applied to, and
- one or more rule entries.
Each rule entry consists of:
- a type of rule,
- zero or more rule properties, and
- zero or more conditions depending on the rule type.
Lastly, each condition consists of:
- a formula, value, or string,
- an optional color.
The flow of the import process varies depending on the type of the conditional formatting being imported. The following is an example of importing a conditional formatting that consists of a rule that applies a format when the cell value is greather than 2:
import_conditional_format* iface = ... ;
iface->set_range("A2:A13");
iface->set_xf_id(14);
iface->set_type(conditional_format_t::condition);
iface->set_operator(condition_operator_t::expression);
iface->set_operator(condition_operator_t::greater);
iface->set_formula("2");
iface->commit_condition();
iface->commit_entry();
iface->commit_format();
- Todo:
- Revise this API for simplification.