Surpass is writing (and eventually reading) excel workbooks in pure Ruby. Surpass is based on xlwt (and pyExcelerator). For comprehensive documentation, please refer to the PDF manual which is available from http://surpass.rubyforge.org or in the root directory of the source code repository. If you like to learn from playing with working examples, then there are plenty in the examples/ and webby/examples directories of the source code.
Gemfile gem 'surpass', '~> 0.0.9'
install gem install surpass -v 0.0.9