你好,我想问一下我在项目中使用 @grapecity/spread-excelio 安装这个包,但是报错了。我的代码是import excelIO from '@grapecity/spread-excelio'
然后我的导出函数是
const exportExcel = () => {
const json = JSON.stringify(spreadRef.current.toJSON({includeBindingSource: true}))
const fileName = 'test.xlsx'
excelIO.save(json, function (blob: any) {
FileSaver.saveAs(blob, fileName)
}, function (e: any) {
})
}
但是 excelIO.save 提示报错了 “类型“typeof Excel”上不存在属性“save”。ts(2339)”
请问这个应该怎么解决 ?
[size=1.5]
|
|