How to add template in codeigniter |how to create template in codeigniter| template in codeigniter 4
Hello peoples,
I am back with a new tutorial article on how to export HTML table in excel format using simple jquery plugin. So let’s get started. follow my steps :
- First of all, you need an HTML table to design and also need jquery.min.js for running jquery.
- Give an id to your table and then make a button where you click for export in excel format.
- Now click here to download the jquery plugin.
- Extract the plugin zip file and go src->jquery.table2excel.js. copy this file to your project folder and call this js file in your page where the table you have designed.
- Now take onclick method on your button that you made in step 2 and call the function on a script and implement the below codes.
$("#needExcel").table2excel({ exclude: ".noExl", name: "Excel Document Name", filename: "newexcelfile", fileext: ".xls", exclude_img: true, exclude_links: true, exclude_inputs: true });
Now click on your button and you will see the table is downloading in excel format. If any problem occoured don’t forgot to comment below.
Related posts