本帖最后由 penny. 于 2023-5-15 09:24 编辑
前端用spreadJS直接打开后台返回的Url,excelFile参数应该怎么写
excelIo.open(excelFile, function (json) {
let workbookObj = json;
spread.fromJSON(workbookObj)
}
或者转为blob格式
await fetch(url)
.then((response) => response.blob())
.then((res) => {
console.log(res);
excelIo.open(res, function (json) {
let workbookObj = json;
spread.fromJSON(workbookObj)
})
}
也没有显示
|