您好,我正在尝试使用 axios 创建一个 excel 文件的下载,但无法下载并打开它,您能帮我检查一下问题是什么吗?
const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.setAttribute('download', 'atetes.xlsx')
document.body.appendChild(link)
link.click()
Run Code Online (Sandbox Code Playgroud)
我尝试了很多解决方案,但总是得到损坏的文件