Method: Libis::Tools::Spreadsheet#parse
- Defined in:
- lib/libis/tools/spreadsheet.rb
#parse(options = {}) ⇒ Array<Hash>
Parse 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
An Array will be returned with for each row a Hash with the key names as specified in the header options and the corresponding cell values.
95 96 97 98 |
# File 'lib/libis/tools/spreadsheet.rb', line 95 def parse( = {}) @ss.default_sheet = .delete(:sheet) if .has_key?(:sheet) @ss.parse(check_headers()) end |