Class | Spreadsheet::Excel::Row |
In: |
lib/spreadsheet/excel/row.rb
|
Parent: | Spreadsheet::Row |
Access data in this Row like you would in an Array. If a cell is formatted as a Date or DateTime, the decoded Date or DateTime value is returned.
# File lib/spreadsheet/excel/row.rb, line 31 31: def [] idx, len=nil 32: if len 33: idx = idx...(idx+len) 34: end 35: if idx.is_a? Range 36: data = [] 37: idx.each do |i| 38: data.push enriched_data(i, at(i)) 39: end 40: data 41: else 42: enriched_data idx, at(idx) 43: end 44: end
Force convert the cell at idx to a Date
# File lib/spreadsheet/excel/row.rb, line 15 15: def date idx 16: _date at(idx) 17: end
Force convert the cell at idx to a DateTime
# File lib/spreadsheet/excel/row.rb, line 20 20: def datetime idx 21: _datetime at(idx) 22: end