Sha256: 8eb469a4a4603c53e30d99dfd01a1bf51eb8f3e58251ce24921bcb406d6a32c4
Contents?: true
Size: 924 Bytes
Versions: 12
Compression:
Stored size: 924 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for storing data of chartsheets files class Chartsheet < OOXMLDocumentObject # @return [Array, SheetView] array of views attr_accessor :sheet_views def initialize(parent: nil) @sheet_views = [] super end # Parse Chartsheet object # @param file [String] file to parse # @return [Chartsheet] result of parsing def parse(file) root_object.add_to_xmls_stack(root_object.root_subfolder + file) doc = parse_xml(root_object.current_xml) node = doc.xpath('//xmlns:chartsheet').first node.xpath('*').each do |node_child| case node_child.name when 'sheetViews' node_child.xpath('*').each do |view_child| @sheet_views << SheetView.new(parent: self).parse(view_child) end end end root_object.xmls_stack.pop self end end end
Version data entries
12 entries across 12 versions & 1 rubygems