Skip to content

jkowens/tilt-caxlsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tilt-caxlsx

Gem Version Tests

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

  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

About

Integrates Caxlsx with Tilt

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages