I have with my Cucumbertesting, downloaded an .xls file, but this is downloaded as an IO stream in ruby, using Celerity @browser.span(:id, "someid").download
Using the gem 'Spreadsheet', I was hoping to verify the document, but this module seems to only let me open a file from path.
Question head on:
Can I use my IO object and translate it into an .xls file, so that I can open it with my spreadsheet module? Im not sure how to jump from IO too .xls so I can read it.
Can I use my IO object and translate it into an .xls file, so that I can open it with my spreadsheet module?
Yes, you can. The code of gem says that Spreadsheet.open accepts IO object or path as a first parameter (see https://github.com/voraz/spreadsheet/blob/master/lib/spreadsheet.rb ).