1 Answer 5586 Views
Download the js files listed below that has got all the necesarry blocks of codes you need to be able to export an HTML table to excelsheet and add links to those js files in your page.
Create a button for download and give it an id button and give the id myTable to your table. You can replace those ids with the ones you prefer.
Once you have done that, add this script in your view file and declare the class or id names you defined for the button and the table and you are done.
<script type="text/javascript"> $("#button").click(function() { $('#myTable').tableExport({ type : 'excel', escape : 'false', ignoreColumn: [] // add column names as array here if you need to exclude any of them }); }); </script>
Leave a comment