Skip to content

izhiliang/writeexcel_on_rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WriteexcelOnRails

writeexcel for rails gems

Installation

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

Usage

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.')

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Acknowledgment

spreadsheet_on_rails

About

writeexcel for rails, and generate xls template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages