class OoxmlParser::PivotCache
Class for parsing <pivotCache> tag
Attributes
@return [Integer] cacheId of pivot cache
@return [String] id of pivot cache
@return [PivotCacheDefinition] parsed pivot cache definition
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb, line 18 def parse(node) node.attributes.each do |key, value| case key when 'cacheId' @cache_id = value.value.to_i when 'id' @id = value.value.to_s end end parse_pivot_cache_definition self end
Parse Pivot Cache data @param [Nokogiri::XML:Element] node with Pivot Cache data @return [PivotCache] value of PivotCache
Private Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb, line 34 def parse_pivot_cache_definition definition_file = root_object.relationships.target_by_id(id) full_file_path = "#{root_object.unpacked_folder}/xl/#{definition_file}" @pivot_cache_definition = PivotCacheDefinition.new(parent: root_object) .parse(full_file_path) end
@return [PivotCacheDefinition] pivot cache definition for current pivot cache