1
我想將我的html表格導出爲使用js或jquery的excel表格我搜索了谷歌,但沒有獲得任何有用的資源。這裏是我的HTML表的代碼將html5表格導出爲excel jquery
<table>
<thead id='headers'>
<tr>
<th>Select</th>
<th>Name</th>
<th>Mobile</th>
<th>Mail ID</th>
<th>Rating</th>
<th>Date</th>
<th>Notify</th>
<th>View</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox"/></td>
<td>Praveen</td>
<td>9791</td>
<td>[email protected]</td>
<td>5 star</td>
<td>15.2.2013</td>
<td>A</td>
<td>4</td>
</tr>
<tr>
<td><input type="checkbox"/></td>
<td>kumar</td>
<td>97912342333</td>
<td>[email protected]</td>
<td>4 star</td>
<td>16.2.2013</td>
<td>D</td>
<td>3</td>
</tr>
</tbody>
</table>
請幫我找出任何解決方案.........
您確定哪裏沒有有用的結果? [http://stackoverflow.com/questions/6566831/how-to-export-html-table-to-excel-using-javascript](http://stackoverflow.com/questions/6566831/how-to-export- html-table-to-excel-using-javascript) – Morpheus 2013-02-15 12:02:09
非ie解決方案在這裏.. http://stackoverflow.com/questions/6955627/export-dynamic-html-table-to-excel-in-javascript-in-firefox瀏覽器 – naveen 2013-02-15 12:04:59
使用(coloumn name)和
(rows)將內容標記爲excel – Kumar 2013-02-15 12:08:43回答
這裏的溶液(link)
來源
2013-05-16 21:25:28
也許這對你有用。不適合我 – 2015-10-22 20:08:32
我發現the following ,它適用於Chrome(63),Firefox(57)和IE11。簡而言之,您可以通過切片和連接表格行來創建csv。接下來,您將創建一個類型爲「text/csv」的Blob,並最終使用錨點「a」標記的下載屬性下載它,以便頁面不會導航到該文件。
來源
2018-01-25 21:39:40
相關問題