class OoxmlParser::Autofilter

Class for `autoFilter` data AutoFilter temporarily hides rows based on a filter criteria, which is applied column by column to a table of data in the worksheet. This collection expresses AutoFilter settings.

Attributes

filter_column[RW]

@return [FilterColumn] data of filter column

ref[RW]

@return [Coordinates] Reference to the cell range to which the AutoFilter is applied.

Public Instance Methods

parse(node) click to toggle source

Parse Autofilter data @param [Nokogiri::XML:Element] node with Autofilter data @return [Autofilter] value of Autofilter data

# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter.rb, line 19
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'ref'
      @ref = Coordinates.parser_coordinates_range(value.value)
    end
  end

  node.xpath('*').each do |node_child|
    case node_child.name
    when 'filterColumn'
      @filter_column = FilterColumn.new(parent: self).parse(node_child)
    end
  end
  self
end