https://github.com/jkowens/tilt-caxlsx
Integrates Caxlsx with Tilt
https://github.com/jkowens/tilt-caxlsx
ruby tilt xlsx
Last synced: 11 months ago
JSON representation
Integrates Caxlsx with Tilt
- Host: GitHub
- URL: https://github.com/jkowens/tilt-caxlsx
- Owner: jkowens
- License: mit
- Created: 2023-02-09T05:20:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T05:45:59.000Z (over 3 years ago)
- Last Synced: 2025-08-09T21:34:25.104Z (12 months ago)
- Topics: ruby, tilt, xlsx
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tilt-caxlsx
[](https://badge.fury.io/rb/tilt-caxlsx)
[](https://github.com/jkowens/tilt-caxlsx/actions/workflows/test.yml)
Adds support for rendering [Caxlsx](https://github.com/caxlsx/caxlsx) templates using [Tilt](https://github.com/rtomayko/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:
```ruby
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