Skip to content

Instantly share code, notes, and snippets.

@Dysp
Created July 6, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dysp/f7acf6b0aedcc2abacaed6d4c48e1de0 to your computer and use it in GitHub Desktop.
Save Dysp/f7acf6b0aedcc2abacaed6d4c48e1de0 to your computer and use it in GitHub Desktop.
def extract_values(sheets)
values = Array.new
p values
sheets.each do |sheet|
values << sheet.map { |row| row[1].value.to_f }
end
p values
return values
end
# []
# NoMethodError: undefined method `[]' for nil:NilClass
# from kincomwip.rb:47:in `block (2 levels) in extract_values'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment