Created
August 22, 2011 15:17
-
-
Save basuneko/1162627 to your computer and use it in GitHub Desktop.
spreadsheet bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
price = params[:price] | |
File.open(Rails.root.join('tmp', 'price.xls'), 'wb') do |file| | |
file.write(price.read) | |
end | |
book = Spreadsheet.open "#{Rails.root}/tmp/price.xls" | |
sheet = book.worksheet 0 | |
sheet.each do |row| #this rows throws the "Called id for nil, which would mistakenly be 4..." error | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment