0.0
The project is in a healthy, maintained state
The ExportManager allows users to export data from dynamic tables with dynamic columns. The system provides flexibility in selecting the data to be exported and generates a CSV, JSON, Excel, or XML file accordingly.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 7.0
 Project Readme

ExportManager

The ExportManager handles the dynamic export of table data to CSV, JSON, Excel, and XML formats.

Usage

The ExportManager allows users to export data from dynamic tables with dynamic columns. The system provides flexibility in selecting the data to be exported and generates a CSV, JSON, Excel, or XML file accordingly.

Demo

Screencast.from.27-12-24.04.09.24.PM.IST.webm

Quick Start

1) Add the following gems to your Gemfile
   gem "export_manager"
   gem "caxlsx"
   gem "caxlsx_rails"
2) In config/routes.rb, add
   mount ExportManager::Engine, at: '/'

3) Add the following lines to manifest.js
   //= link export_manager/application.css
   //= link export_manager/application.js

4) Run rails assets:precompile in the console

Database Support

1) PostgreSQL
2) MySQL

Installation

Add this line to your application's Gemfile:

gem "export_manager"
gem "caxlsx"
gem "caxlsx_rails"

And then execute:

$ bundle

Or install it yourself as:

$ gem install export_manager

Remove a specific table name from the select box by creating a global.rb file in the config/initializers directory and adding the following code

config/initializers/global.rb

REMOVE_TABLE_NAME = ['ActiveStorageBlobs'] # remove table

Add the custom file name in global.rb

config/initializers/global.rb

CSV_FILE_NAME = "CSV_EXPORT_#{Date.today}.csv"
EXCEL_FILE_NAME = "EXCEL_EXPORT_#{Date.today}.xlsx"
JSON_FILE_NAME =  "JSON_EXPORT_#{Date.today}.json"
XML_FILE_NAME =  "XML_EXPORT_#{Date.today}.xml"

If an authenticated user has the admin? method returning true, they can access the ExportManager engine at /.

  authenticated :user, ->(user) { user.admin? } do
    mount ExportManager::Engine, at: '/'
  end

License

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