Stabilizing the code after the options switch. Getting there...
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user