Project

columnify

0.0
No release in over 3 years
Low commit activity in last 3 years
A powerful Rails responder to create Excel & CSV files with ease
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0

Runtime

>= 5.0, <= 6.0
 Project Readme

Columnify

The columnify gem helps you easily render Excel files through your controller actions with ease.

Table of contents

  • Columnify
    • Table of contents
    • Installing Columnify
    • Usage
    • Contributing
    • License
    • Code of Conduct

Installing Columnify

You need to include the columnify gem inside your Gemfile:

gem 'columnify', '~> 0.0.1'

or you can install the latest build:

gem 'columnify', git: 'https://github.com/kurenn/columnify.git'

Install the gem by running the bundle command:

$ bundle install

After running the bundle command, you can now run the installer.

$ rails g columnify:install

This will just register the xls mime type inside the config/initializers/mime_types.rb file.

Usage

The gem will add a renderer and a template handler for you to easily handle the creation of the Excel file:

# app/views/posts/index.xls.columnify
spreadsheet.worksheet @posts, :id, :title, :content

So the usage for the views is just to call the workbook method, send the array or active record collection, followed by the set of attributes or methods you want to appear on the xls file.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kurenn/columnify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Columnify project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.