rubygems - Ruby Gem to write to excel? -


i'm writing ruby script make changes excel documents based off of criteria's set. i've been using ruby gem 'roo' reading aspect of script haven't been able find suitable writer. i've tried rubyxl , spreadsheet haven't been able them work. there simpler alternative writing or better gem use out there writing excel?

have tried the ruby spreadsheet?

#!/usr/bin/env ruby require 'spreadsheet'  # begin test print "spreadsheet test\n"  # create rows inserted row_1 = ['a1', 'b1'] row_2 = ['a2', 'b2']  # create new workbook new_book = spreadsheet::workbook.new  # create worksheet new_book.create_worksheet :name => 'sheet name'  # add row_1 new_book.worksheet(0).insert_row(0, row_1)  # write file new_book.write('test.xls') 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -