class Xlsxrb::Ooxml::Reader::DataConsolidateListener
SAX2 listener for parsing <dataConsolidate> element.
Attributes
result
[R]
untyped
Public Class Methods
() → untyped
Source
# File lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb, line 661 def initialize @result = nil end
Public Instance Methods
(untyped _uri, untyped local_name, untyped qname, untyped attributes) → untyped
Source
# File lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb, line 665 def start_element(_uri, local_name, qname, attributes) name = element_name(local_name, qname) case name when "dataConsolidate" @result = {} @result[:function] = attributes["function"] if attributes["function"] @result[:start_labels] = true if %w[1 true].include?(attributes["startLabels"]) @result[:left_labels] = true if %w[1 true].include?(attributes["leftLabels"]) @result[:top_labels] = true if %w[1 true].include?(attributes["topLabels"]) @result[:link] = true if %w[1 true].include?(attributes["link"]) @result[:data_refs] = [] when "dataRef" if @result ref = {} ref[:ref] = attributes["ref"] if attributes["ref"] ref[:name] = attributes["name"] if attributes["name"] ref[:sheet] = attributes["sheet"] if attributes["sheet"] @result[:data_refs] << ref end end end