Sha256: b15dfda0f85aca2ffaf79dd81b925bbff3b5a289bcb3c457edf105c6edd0851a
Contents?: true
Size: 930 Bytes
Versions: 21
Compression:
Stored size: 930 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for parsing <sheet> tag class Sheet < OOXMLDocumentObject # @return [String] Name of sheet attr_reader :name # @return [Integer] SheetId of sheet attr_reader :sheet_id # @return [Symbol] Specifies if sheet is hidden attr_reader :state # @return [String] Id of sheet attr_reader :id def initialize(parent: nil) @state = :visible super end # Parse Sheet data # @param [Nokogiri::XML:Element] node with Sheet data # @return [Sheet] value of Sheet def parse(node) node.attributes.each do |key, value| case key when 'name' @name = value.value.to_s when 'sheetId' @sheet_id = value.value.to_i when 'state' @state = value.value.to_sym when 'id' @id = value.value.to_s end end self end end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
ooxml_parser-0.21.0 | lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/sheet.rb |