class OoxmlParser::TableColumn

Class for `tableColumn` tag data

Attributes

id[R]

@return [Integer] id of table column

name[R]

@return [String] name

totals_row_function[R]

@return [String] total row function

totals_row_label[R]

@return [String] total row label

Public Instance Methods

parse(node) click to toggle source

Parse Table Column data @param [Nokogiri::XML:Element] node with TableColumn data @return [TableColumn] value of TableColumn data

# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_columns/table_column.rb, line 18
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'id'
      @id = value.value.to_i
    when 'name'
      @name = value.value.to_s
    when 'totalsRowLabel'
      @totals_row_label = value.value.to_s
    when 'totalsRowFunction'
      @totals_row_function = value.value.to_s
    end
  end
  self
end