使用xlxs-js

function exportExcel () {
    var wb = XLSX.utils.table_to_book(document.querySelector('.my-el-table'))
    var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
    try {
          FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), 'userlist.xlsx')
    } catch (e) { 
           if (typeof console !== 'undefined') console.log(e, wbout) 
    }
    return wbout
},

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-10-07
  • 2022-01-21
  • 2022-12-23
  • 2022-01-23
猜你喜欢
  • 2021-05-20
  • 2021-07-02
  • 2021-11-30
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
相关资源
相似解决方案