Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

276
Views
I am trying to Export links in Html table to excel sheet But its not working

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!