Class: XlsxWriter::Autofilter
- Inherits:
-
Object
- Object
- XlsxWriter::Autofilter
- Defined in:
- lib/xlsx_writer/autofilter.rb
Instance Method Summary collapse
-
#defined_name ⇒ Object
Sheet1!$A$1:$B$1.
- #dollar_range ⇒ Object
- #to_xml ⇒ Object
Instance Method Details
#defined_name ⇒ Object
Sheet1!$A$1:$B$1
8 9 10 |
# File 'lib/xlsx_writer/autofilter.rb', line 8 def defined_name "#{sheet.name}!#{dollar_range}" end |
#dollar_range ⇒ Object
12 13 14 15 |
# File 'lib/xlsx_writer/autofilter.rb', line 12 def dollar_range a = /([A-Z]+)(\d+):([A-Z]+)(\d+)/.match(range).captures.map { |c| c.prepend '$' } [ a.first(2).join, a.last(2).join ].join(':') end |
#to_xml ⇒ Object
3 4 5 |
# File 'lib/xlsx_writer/autofilter.rb', line 3 def to_xml %{<autoFilter ref="#{range}" />} end |