Module: SingleXLSX::Reading

Included in:
SingleXLSX
Defined in:
lib/single_xlsx/reading.rb

Instance Method Summary collapse

Instance Method Details

#read(path) ⇒ Object



6
7
8
9
10
11
# File 'lib/single_xlsx/reading.rb', line 6

def read(path)
  book = RubyXL::Parser.parse(path)
  book[0].sheet_data.rows.map do |row|
    row.cells.map { |cell| cell.try(:value).presence }
  end
end