Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用导出EXCEL功能报错 #4191

Open
ayamzh opened this issue Aug 22, 2023 · 2 comments
Open

使用导出EXCEL功能报错 #4191

ayamzh opened this issue Aug 22, 2023 · 2 comments

Comments

@ayamzh
Copy link

ayamzh commented Aug 22, 2023

Bug report(问题描述)

使用导出excel功能时报错
代码参考文档的
import('@/vendor/Export2Excel').then(excel => {
excel.export_json_to_excel({
header: tHeader, //表头 必填
data, //具体数据 必填
filename: 'excel-list', //非必填
autoWidth: true, //非必填
bookType: 'xlsx' //非必填
})
})

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

image
image
image

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:
@chengleigit
Copy link

我也一样

@Barry-Flynn
Copy link

image

import XLSX from 'xlsx' 改为 import * as XLSX from 'xlsx' 即可

Barry-Flynn added a commit to Barry-Flynn/vue-element-admin that referenced this issue Mar 14, 2024
Export2Excel.js 代码第 83 行报错,找不到属性 XLSX.utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants