i want to increment the loop iteration to next n rows if some condition matches.
sample code:
(8..spreadsheet.last_row).each do |i|
spreadsheet_row = spreadsheet.row(i).compact
next 3 if spreadsheet_row[0] == "Department:" # increment to next 3 row or skip the next 3 rows.
next 6 if spreadsheet_row[0] == "Employee"
end
but the next n is not working here, how to make this work.