Abstraction layer to export tabular data. Currently dumpster supports XLSX and CSV exports.
Add this line to your application's Gemfile:
Or install it yourself as:
$ gem install dumpster
data = [['col1-row1', 'col2-row1'], ['col1-row2', 'col2-row2']] model = ::::.(data) writer = .(model) writer = .(model, :type => :windows) writer = .(model) writer.write_to_file('/some/directory/some.file')
Dumpster ships with a
Dumpster::Model::ActiveRecordSql. This model
allows you to execute arbitrary SQL through ActiveRecord to export the
model = ::::.('SELECT * from users') writer = .(model) # for CSV output writer = .(model) # for Excel output writer.write_to_file('/some/directory/some.file')
Please read the contribution guidelines before submitting code.