Get In Touch
TC 73/1214,Enchakal
Vallakadavu(PO), Thiruvananthapuram,
Kerala- 695008.

Export HTML Table To CSV / Excel / Text

Here we are going to see how to export html table data instead of copying the records manually by using jquery plugin “tableExport” into different format like xls, csv and text.

Following are the necessary files which you need to include into your head section of template,

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/TableExport/4.0.11/css/tableexport.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://fastcdn.org/FileSaver.js/1.1.20151003/FileSaver.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/TableExport/4.0.11/js/tableexport.min.js"></script>

Add the below script under the your table in boy section,

<script>
    $("table").tableExport();
</script>

Once this is done, just reload the page and you can see the options to export the table as below.

Now, select the required format to export the table data and save the file to your local as below.

That's all..!

This website stores cookies on your computer.

START A CONVERSATION

Please enable JavaScript in your browser to complete this form.

Junior Scrum Master

Business Development Executive

Business Operation Analyst

Senior Python Django Developer

Technical Project Manager

React JS Developer

MBA Fresher Recruitment ( 2022 & 2023 passed out)