0

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.

user294937
  • 181
  • 13

1 Answers1

1

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 ).

DNNX
  • 6,215
  • 2
  • 27
  • 33
  • Thanks for this, although I bumped into another problem and could not verify, you pointed me to the right documentation, thanks. – user294937 Aug 24 '12 at 06:47