Description

class Axlsx::Filters

When multiple values are chosen to filter by, or when a group of date values are chosen to filter by, this object groups those criteria together.

Note:

The recommended way to interact with filter objects is via AutoFilter#add_column

Creates a new Filters object

Examples:

ws.auto_filter.add_column(0, :filters, :blank => true, :calendar_type => 'japan', :filter_items => [100, 'a'])

Parameters:

  • options (Hash) (defaults to: {})

    Options used to set this objects attributes and create filter and/or date group items

  • [Boolean] (Hash)

    a customizable set of options

  • [String] (Hash)

    a customizable set of options

  • [Array] (Hash)

    a customizable set of options

Tells us if the row of the cell provided should be filterd as it does not meet any of the specified filter_items or date_group_items restrictions. TODO implement this for date filters as well!

Parameters:

  • cell (Cell)

    The cell to test against items

Flag indicating whether to filter by blank.

Calendar type for date grouped items. Used to interpret the values in dateGroupItem. This is the calendar type used to evaluate all dates in the filter column, even when those dates are not using the same calendar system / date formatting.

the date group values in this filters object

Note:

This can be specified, but will not be applied to the date

Date group items are date group filter items where you specify the date_group and a value for that option as part of the auto_filter values in your workbook at this time.

Raises:

  • (ArgumentError)

The filter values in this filters object

not entirely happy with this. filter_items should be a simple typed list that overrides << etc to create Filter objects from the inserted values. However this is most likely so rarely used…(really? do you know that?)

Serialize the object to xml

Filters is referenced in 0 repositories