class SimpleXlsxReader::Document
Attributes
file_path[R]
Public Class Methods
new(file_path)
click to toggle source
# File lib/simple_xlsx_reader.rb, line 62 def initialize(file_path) @file_path = file_path end
Public Instance Methods
sheets()
click to toggle source
# File lib/simple_xlsx_reader.rb, line 66 def sheets @sheets ||= Mapper.new(xml).load_sheets end
to_hash()
click to toggle source
# File lib/simple_xlsx_reader.rb, line 70 def to_hash sheets.inject({}) {|acc, sheet| acc[sheet.name] = sheet.rows; acc} end
xml()
click to toggle source
# File lib/simple_xlsx_reader.rb, line 74 def xml Xml.load(file_path) end