Export Html To Excel Jquery
Html to Excel Using Jquery plugin
Below code provide soilution for convert your html in Export html table to excel using jquery plugin.
you can also find a other format to convert in to excel.
Html Code :
<table id=”tblExport” style=”border:1px solid black; “>
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td style=’background-color:red;’>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
Scripts:
<script src=”Scripts/jquery-2.0.1.min.js”></script>
<script src=”Scripts/jquery.btechco.excelexport.js”></script>
<script src=”Scripts/jquery.base64.js”></script>
<script>
$(document).ready(function () {
$(“#btnExport”).click(function () {
$(“#tblExport”).btechco_excelexport({
containerid: “tblExport”
, datatype: $datatype.Table
});
});
});
</script>
Use above code and Enjoy Download
