is there an easy way to export database resultset to excelsheet?

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>   

Download js files from here.

export.js

base.js

Send Your Answer

The comment/answer feature from this section has been removed. Please visit our new section is there an easy way to export database resultset to excelsheet? to add comments or answer. Thankyou.