4.upto(workbook.last_row) do |row| hash[row] = [] workbook.row(row).each do |cell| hash[row] << cell end end