Method: Libis::Tools::Spreadsheet#each
- Defined in:
- lib/libis/tools/spreadsheet.rb
#each(options = {}, &block) ⇒ Object
Iterate over sheet content.
The options Hash can contain the following keys:
-
:sheet - overwrites default sheet name
-
:required - Array or Hash of required headers
-
:optional - Array or Hash of optional headers
-
:noheader - Array of noheader headers
Each iteration, a Hash will be passed with the key names as specified in the header options and the corresponding cell values.
77 78 79 80 |
# File 'lib/libis/tools/spreadsheet.rb', line 77 def each( = {}, &block) @ss.default_sheet = [:sheet] if [:sheet] @ss.each(check_headers(), &block) end |