Project

table2csv

0.0
No commit activity in last 3 years
No release in over 3 years
Export a html table into csv file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

Table2csv

Build Status Code Climate security

Table2csv gem allows you to export a table to csv.

Installation

Add this line to your application's Gemfile:

gem 'table2csv'

And then execute:

$ bundle

Or install it yourself as:

$ gem install table2csv

To use this gem add this require statement to your application.js file:

//= require table2csv

Usage

Use the table_export_tag helper like any other regular tag helper next to your table:

<%= table_export_tag %>

In order to select a particular table use id of the table as follows

<%= table_export_tag('id of the table') %>

Options can be provided as second parameter.Following options are available:

export_link_text: 'Download'
width: '400px'
height: '500px'
color: '#444'
bgcolr: '#000'  (background-color)

<%= table_export_tag('name',{export_link_text: 'Download', width: '100px', height: '50px', color: '#E01111', bgcolor: '#444'})%>

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ethirajsrinivasan/table2csv. 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.

table2csv