I need to create an html script that create a table of contact and using the jQuery. I am trying to download this html page and convert it to excel file.
can anyone help me ??
I have this html file
contact.html
<div id="dv">
<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>
</div>
<div>
<button id="btnExport">Export to excel</button>
</div>
</div>
So how to use jQuery to make the button download this table and convert it to an excel sheet ??