Sha256: 425da7d95083e2cd16745812880ac4a514c973f0d9027c6d9c3d0ef29a8f86e5
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
# XlsExporter ## Installation Add this line to your application's Gemfile: ```ruby gem 'xls_exporter' ``` And then execute: $ bundle Or install it yourself as: $ gem install xls_exporter ## Usage ```ruby class User attr_accessor :id, :first_name, :last_name, :email end require 'xls_exporter' XlsExporter.export do filename 'your-file-name' add_sheet 'your-sheet-name' export_models collection, :id, { full_name: -> { first_name + last_name } }, { user_email: :email } end ``` Result | ID | Full Name | User Email | |----|----------------|-------------------------------| | 1 | Zhora Zhukov | victory_marshal@army.su | | 2 | Petr The First | borody@doloi.ru | | 3 | Vladimir P. | babushka_would_be@dedushka.ru | ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xls_exporter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xls_exporter-1.2 | README.md |