I am using roo
to read an xlsx file.
book = Roo::Spreadsheet.open("codes.xlsx")
sheet = book.sheet('Sheet1')
This reads all the rows in the file.
I can iterate through this sheet using
plans_sheet.each(column_1: 'column_1', column_2: 'column_2') do |hash|
But this iteration happens from the first row which has all the column names as well. I need to take only the second row data.
Update - when you do row(2) it returns you an array. And when you are iterating using .each it returns you a hash which has column names as your key .
How to do that.
If you want to iterate over rows starting from the second one, just use Enumerable#drop