Google+ Followers

Tuesday, 11 February 2014

Ruby method to read from excel (calabash helper)

Ruby code to open excel .xls or .xlsx files and then read it into variable

specify absolute or relative path of file 
then run this below code from ruby  
  file_path= <location of excel file>
      workbook ||= RubyXL::Parser.parse(file_path)
      strings||=workbook[0].get_table[:table]

No comments:

Post a Comment