This plugin converts any set of columns of a HTML table to a CSV file that can then be viewed in a popup window, as a data string, or downloaded as a file.
Dependencies:
This plugin was developed using jQuery 1.6.2 and is not tested with other versions.
Usage:
Include script file however you need to for your particular project.
HTML:<script src='jquery.table2CSV.js'></script>
cakePHP 1.2: echo $javascript->link("jquery.table2CSV.js");
cakePHP 1.3: echo $html->script('jquery.table2CSV.js');
Then, simply execute the javascript line jQuery('#table-id').table2CSV(); to use the plugin with the default options.
Options:
separator (Default: ',')
The character that separates entries in the resulting CSV file.
delivery (Default: 'popup')
The manner in which to return the CSV data file. Options are:
'popup' - opens a new window and displays the CSV data in a box where it can be copied from.