Skip to content

Instantly share code, notes, and snippets.

@failshell
Created October 31, 2012 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save failshell/3988666 to your computer and use it in GitHub Desktop.
Save failshell/3988666 to your computer and use it in GitHub Desktop.
if opts.xls
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet
sheet.name = 'Hydra'
results.each do |result|
row = sheet.row(sheet.row_count + 1)
row.push result[0]
result[1].each { |r| row.push r }
end
begin
book.write('hydra.xls')
rescue => e
STDERR.puts "ERROR: #{e}".red
exit(1)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment