class OoxmlParser::Location

Class for parsing <location> tag

Attributes

first_data_column[R]

@return [Integer] first data column

first_data_row[R]

@return [Integer] first data row

first_header_row[R]

@return [Integer] first header row

ref[R]

@return [String] ref of location

Public Instance Methods

parse(node) click to toggle source

Parse ‘<location>` tag @param [Nokogiri::XML:Element] node with location data @return [Location]

# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb, line 18
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'ref'
      @ref = value.value.to_s
    when 'firstHeaderRow'
      @first_header_row = value.value.to_i
    when 'firstDataRow'
      @first_data_row = value.value.to_i
    when 'firstDataCol'
      @first_data_column = value.value.to_i
    end
  end
  self
end