Home Index Book Sheet Format Font AutoFilter FilterColumn RichString FormControl
ConditionalFormatting ConditionalFormat Examples
ConditionalFormatting ConditionalFormat Examples
FilterColumn class reference
-
int index() const Returns the zero-based index of this AutoFilter column.
-
Filter filterType() const Returns the filter type of this AutoFilter column.
Filter value Description FILTER_VALUE Filter by specified values. FILTER_TOP10 The top N (percent or number of items) to filter by. FILTER_CUSTOM Custom filter with specified criteria. FILTER_DYNAMIC Specifies dynamic filter criteria. FILTER_COLOR Specifies the color to filter by. FILTER_ICON Specifies the icon to filter by. FILTER_EXT Defines flexible storage extensions. FILTER_NOT_SET No filter. -
int filterSize() const Returns the number of filter values.
-
const wchar_t* filter(int index) const Returns the filter value by index.
-
void addFilter(const wchar_t* value) Adds the filter value. See the example.
-
bool getTop10(double* value, bool* top, bool* percent) Gets the number of top or bottom items:
value - number of items;
top - top items if true otherwise bottom items;
percent - using percent instead of number items.
Returns false if error. Get an error info with the Book::errorMessage(). -
void setTop10(double value, bool top = true, bool percent = false) Sets the number of top or bottom items:
value - number of items;
top - top items if true otherwise bottom items;
percent - using percent instead of number items.
See the example. -
bool getCustomFilter(Operator* op1, const wchar_t** v1, Operator* op2, const wchar_t** v2, bool* andOp) Gets the custom filter criteria:
op1 - operator used by the filter comparison in the first filter criteria;
v1 - value used in the first filter criteria;
op2 - operator used by the filter comparison in the second filter criteria;
v2 - value used in the second filter criteria;
andOp - flag indicating whether the two criterias have an "and" relationship. True indicates "and", false indicates "or".
Returns false if error. Get an error info with the Book::errorMessage(). -
void setCustomFilter(Operator op1, const wchar_t* v1, Operator op2 = OPERATOR_EQUAL, const wchar_t* v2 = 0, bool andOp = false) Sets the custom filter criteria:
op1 - operator used by the filter comparison in the first filter criteria;
v1 - value used in the first filter criteria;
op2 - operator used by the filter comparison in the second filter criteria;
v2 - value used in the second filter criteria;
andOp - flag indicating whether the two criterias have an "and" relationship. True indicates "and", false indicates "or". See the examples here and here.Operator value Description OPERATOR_EQUAL = OPERATOR_GREATER_THAN > OPERATOR_GREATER_THAN_OR_EQUAL >= OPERATOR_LESS_THAN < OPERATOR_LESS_THAN_OR_EQUAL <= OPERATOR_NOT_EQUAL <> -
void clear() Clear the filter criteria.