writeexcel for rails gems
Add this line to your application's Gemfile:
gem 'writeexcel_on_rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install writeexcel_on_rails
Add support for the new format in your controller:
class HomeController < ApplicationController
def index
respond_to do |format|
format.html
format.xls { render :xls => "<filename>"}
end
end
end
Create an xls view app/views/home/index.rxls:
worksheet = workbook.add_worksheet("title")
worksheet.write(1, 1, 'Hi Excel.')
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request