Class: OoxmlParser::Autofilter
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Autofilter
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/autofilter.rb
Overview
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.
Instance Attribute Summary collapse
-
#filter_column ⇒ FilterColumn
Data of filter column.
-
#ref ⇒ Coordinates
Reference to the cell range to which the AutoFilter is applied.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ Autofilter
Parse Autofilter data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#filter_column ⇒ FilterColumn
Returns data of filter column.
14 15 16 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/autofilter.rb', line 14 def filter_column @filter_column end |
#ref ⇒ Coordinates
Returns Reference to the cell range to which the AutoFilter is applied.
12 13 14 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/autofilter.rb', line 12 def ref @ref end |
Instance Method Details
#parse(node) ⇒ Autofilter
Parse Autofilter data
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ooxml_parser/xlsx_parser/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 |