Excel PDF CSV Export for jQuery Datatable




The Jquery Data-table has PDF ,CSV ,Excel support which  reduce lot of cording by integrating other open source libraries .
 https://datatables.net/extensions/buttons/examples/initialisation/export.html

Here I have indicated step by step guide for the integration .


Step 1 .

JS Imports 

dataTables.buttons.min.js  //Provided in \DataTables-1.10.13\extensions\Buttons

buttons.flash.min.js            //Provided in \DataTables-1.10.13\extensions\Buttons
buttons.html5.min.js          //Provided in \DataTables-1.10.13\extensions\Buttons
buttons.print.min.js           //Provided in \DataTables-1.10.13\extensions\Buttons
jszip.min.js                       //Please download from http://stuk.github.io/jszip/
pdfmake.min.js                //Please Download from https://github.com/bpampuch/pdfmake
vfs_fonts.js                     //Please Download from https://github.com/bpampuch/pdfmake

CSS imports 
buttons.dataTables.min.css        //Provided in \DataTables-1.10.13\extensions\Buttons


Step 2 .

                                      $('#table').DataTable( {
"dom": 'Bfrtip',
"buttons": [
'copy', 'csv', 'excel', 'pdf', 'print'
],
"pageLength": 100,
"ajax": "./index.php?                     controller=outlet&action=get&id="+ ter,
"columns": [

Comments

Popular posts from this blog

ENOENT: no such file or directory, rename : node_modules/async

react-quill Integrate quill-image-resize-module