RailsCasts Pro episodes are now free!

Learn more or hide this

Przemysław Bobak's Profile

GitHub User: bobek-balinek

Site: http://www.pbobak.co.uk

Comments by Przemysław Bobak

Avatar

Use:

ruby
  Roo::Excel.new(file.path, nil, :ignore)

Just checked on both 1.9.2 and 1.9.3, works fine.

Avatar

I found a fix for it just now. I called up Excel/Csv classes from the Roo object. Seems to be working ok

ruby
def self.open_spreadsheet(file)
  case File.extname(file.original_filename)
    # ...
    when ".xls" then Roo::Excel.new(file.path, nil, :ignore)
    # ...
  end
end