export table data in to Excel using jQuery

Only one line of jQuery code can export table data into MS Excel sheet.

HTML

<button id="myButtonControlID">Export Table data into Excel</button>
<div id="divTableDataHolder">
<div><h1>hello</h1></div>
<table border="1px">
    <tr><th>ColumnOne </th><th>ColumnTwo</th></tr>
<tr>
<td>row1ColValue1</td><td>row1ColValue2</td>
</tr>
<tr>
<td>row2ColValue1</td><td>row2ColValue2</td>
</tr>
</table>
</div>

JavaScript

$("[id$=myButtonControlID]").click(function(e) {
    window.open('data:application/vnd.ms-excel,' + $('div[id$=divTableDataHolder]').html());
    e.preventDefault();
});