I am trying to export tag in table to excel sheet but I'm not able to find out proper function or method which helps to do it. These links should be like hyperlink in the excel sheet.
I'm using a library:
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js"></script>
Code
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js">
<script>
function export_data(){
let data=document.getElementById('data');
const workbook = XLSX.utils.book_new();
var ws2 = XLSX.utils.table_to_sheet(data);
XLSX.utils.book_append_sheet(workbook, ws2, "Dat");
XLSX.writeFile(workbook, 'test.xlsx');
}
</script>
<input type="button" onclick="export_data()" value="Export">
<table id="data" border="1">
<tr>
<td>S.No</td>
<td>Name</td>
</tr>
<tr>
<td >3434</td>
<td> <a href="www.google.com">Google</a></td>
</tr>
</table>
Let me know if you have already done this type of work. Thankyou