title: How to read an xlsx or xls file from a URL
body: <p>I'm trying to open a file from a URL using roo (1.11.0) </p>
  
  <pre><code>Foobazs-iMac:pipeline foobazlabs$ irb
  irb(main):001:0&gt; require 'roo'
  require '=&gt; true
  irb(main):002:0&gt; require 'open-uri'
  =&gt; true
  irb(main):003:0&gt; Roo::Excelx.new(open("https://www.filepicker.io/api/file/xPxn6cu3RZuQdgrx4y72"))
  NoMethodError: undefined method `start_with?' for #&lt;Tempfile:0x007ffd091d25c8&gt;
  </code></pre>
  
  <p>but it looks like there isn't support for this using roo (it accepts only path names)</p>
  
  <p>Can't use a temp file path name either</p>
  
  <pre><code>irb(main):004:0&gt; t = Tempfile.new('temp.xlsx')
  =&gt; #&lt;File:/var/folders/q_/q738l9cj3xl90yfs1g8wc4200000gn/T/temp.xlsx20130317-2753-1p3l5l6&gt;
  irb(main):005:0&gt; t.binmode
  irb(main):006:0&gt; open("https://www.filepicker.io/api/file/xPxn6cu3RZuQdgrx4y72") { |data| t.write   data.read }
  =&gt; 13494
  irb(main):007:0&gt; Roo::Excelx.new(t.path)
  use Roo::Excelx.new to handle .xlsx spreadsheet files. This has .xlsx20130317-2753-1p3l5l6
  TypeError: /var/folders/q_/q738l9cj3xl90yfs1g8wc4200000gn/T/temp.xlsx20130317-2753-1p3l5l6 is not an Excel-xlsx file
  </code></pre>
  
  <p>Any Ruby library/gem that I can use for this purpose? I only need to read xls and xlsx files. I don't need to write. Since I'm on Heroku, I can only use Tempfiles not actual Files.</p>