Sha256: 34b3a489ad0ed7482f09205d9f6b220be140e58276a4846cdbad53e783d67146
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
require_relative 'sheet_view/pane' module OoxmlParser # Class for `sheetView` data class SheetView < OOXMLDocumentObject attr_accessor :pane # @return [True, False] Flag indicating whether this sheet should display gridlines. attr_accessor :show_gridlines # @return [True, False] Flag indicating whether the sheet should display row and column headings. attr_accessor :show_row_column_headers def initialize(parent: nil) @parent = parent @show_gridlines = true @show_row_column_headers = true end # Parse SheetView object # @param node [Nokogiri::XML:Element] node to parse # @return [SheetView] result of parsing def parse(node) node.attributes.each do |key, _value| case key when 'showGridLines' @show_gridlines = attribute_enabled?(node, key) when 'showRowColHeaders' @show_row_column_headers = attribute_enabled?(node, key) end end node.xpath('*').each do |node_child| case node_child.name when 'pane' @pane = Pane.new(parent: self).parse(node_child) end end self end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ooxml_parser-0.2.0 | lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_view.rb |