Stabilizing the code after the options switch. Getting there...

This commit is contained in:
Andy Meneely
2014-07-28 17:08:57 -04:00
parent e38b5dfdbe
commit f6480445df
11 changed files with 45 additions and 49 deletions
+3 -3
View File
@@ -16,9 +16,9 @@ module Squib
# @param sheet: [Integer] The zero-based index of the sheet from which to read.
# @api public
def xlsx(opts = {})
needs(opts, [:file, :sheet])
s = Roo::Excelx.new(file)
s.default_sheet = s.sheets[sheet]
opts = needs(opts, [:file, :sheet])
s = Roo::Excelx.new(opts[:file])
s.default_sheet = s.sheets[opts[:sheet]]
data = {}
s.first_column.upto(s.last_column) do |col|
header = s.cell(s.first_row,col).to_s