Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Forked from aya-soft/xls_spec.rb
Created February 13, 2019 18:42
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 wellington1993/536a4231b895b2aa319a73f935d0d4fe to your computer and use it in GitHub Desktop.
Save wellington1993/536a4231b895b2aa319a73f935d0d4fe to your computer and use it in GitHub Desktop.
Spreadsheet: wrong value from formula
#encoding: utf-8
require 'spreadsheet'
xls_file_name = "/tmp/status_data.xls"
xls_book = Spreadsheet.open(xls_file_name, "rb")
xls_book.worksheet(0).each do |row|
puts row[6].value if row[6] and row[6].is_a?(Spreadsheet::Formula)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment