tilt-caxlsx
Adds support for rendering Caxlsx templates using Tilt.
Installation
Add this line to your application's Gemfile:
gem 'tilt-caxlsx'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tilt-caxlsx
Usage
Create a template with the .xlsx or .axlsx extension. Use xlsx_package
variable to create your spreadsheet:
wb = xlsx_package.workbook
wb.add_worksheet(name: "Users") do |sheet|
sheet.add_row ["ID", "Email", "Full Name"]
@users.each do |user|
sheet.add_row [user.id, user.email, user.full_name]
end
end
Contributing
- 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