No commit activity in last 3 years
No release in over 3 years
This tool allows you to generate quick and simple Excel reports based on the array of records returned by your ActiveRecord queries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.6.4
~> 3.0.10
>= 0
~> 2.3.0
= 0.6.5.8
~> 4.4.2

Runtime

= 0.6.5.8
 Project Readme

active_record_to_excel

active_record_to_excel is a litle tool for generate simple MS Excel reports based on the results returned from your ActiveRecord queries.

Usage

In your Gemfile:

gem 'active_record_to_excel'

Generating reports:

User.all.to_excel({ :name => 'Name', :email => 'Email' })

That line of code creates a report.xls file under the public folder of your rails app.

The keys on the hash are methods of you ActiveRecord object that returns the value required, the values are the labels of the columns on the Excel sheet.

You can pass optionally two arguments: :filename and :path

User.all.to_excel({ :name => 'Name', :email => 'Email', :path => '~/reports', :filename => 'users.xls' })

It will create a users.xls file in your $HOME/reports directory.

Copyleft

Copyleft (ɔ) 2011 Rubén Dávila