I have the following worksheet and I need to read the situation:
- A query that returns me only Alan PO 129877764 alan@gmail.com
- A query that returns me only Robert QA 119875764 robertqa@gmail.com
One query bringing a record without the code, situation and tab field, and another query bringing all the rows without the code, situation and tab field.
| code | situation | tab | name | job | tel | |
|---|---|---|---|---|---|---|
| 8 | Executed | existing hydrometer | Alan | PO | 129877764 | alan@gmail.com |
| 9 | Not Executed | valid reading | Robert | QA | 119875764 | robertqa@gmail.com |
I can't get the values of row 1. If I start the row with 1 I get them all, if I start the row with 2 I get the values of row 2 together with nil. See this image:
sheet.each 2 do |row|
puts "#{row[3,3]}"
break if row[1].nil?
end
book.io.close