title: Read a xlsx/xls file - Rails 4
body: <p>Good day stackoverflow</p>
  
  <p>I have this in the controller</p>
  
  <pre><code>def upload
   file_data = params[:data]
  
   #s = Roo::Excel.new(file_data.path)
   book = Spreadsheet.open file_data.path
  
   #--- continuous to read the file ---#
  end
  </code></pre>
  
  <p>The problem is that it can read a .xls file on the Spreadsheet gem, but can't read a .xlsx file</p>
  
  <p>In contrast the Roo gem can read both .xls/.xlsx files, but the param <code>file_data.path</code>don't work for the <code>Excel.new</code>function, shows a <code>"is not an Excel file"</code> error</p>
  
  <p>I send the excel file in a file_field_tag in a form on the view, of course</p>
  
  <p>Any ideas for the param <code>file_data.path</code> stackoverflow?</p>