class OoxmlParser::Sheet
Class for parsing <sheet> tag
Attributes
id[R]
@return [String] Id of sheet
name[R]
@return [String] Name
of sheet
sheet_id[R]
@return [Integer] SheetId of sheet
state[R]
@return [Symbol] Specifies if sheet is hidden
Public Class Methods
new(parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/xlsx_parser/workbook/sheet.rb, line 15 def initialize(parent: nil) @state = :visible super end
Public Instance Methods
parse(node)
click to toggle source
Parse Sheet
data @param [Nokogiri::XML:Element] node with Sheet
data @return [Sheet] value of Sheet
# File lib/ooxml_parser/xlsx_parser/workbook/sheet.rb, line 23 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