Luckyexcel
Luckyexcel copied to clipboard
后台返回excel流文件使用LuckyExcel.transformExcelToLucky怎么返显到列表上
使用
用new = File([blob]) 得 file 注入到 LuckyExcel.transformExcelToLucky里面去就会一直报错 ‘getInnerElements’找不到
使用 LuckyExcel.transformExcelToLucky(file.raw) 可以返显本地文件,
用new = File([blob]) 得 file 注入到 LuckyExcel.transformExcelToLucky里面去就会一直报错 ‘getInnerElements’找不到
同样的问题,你如何解决了?
我也。。 你解决了吗? 不知道 LuckyExcel.transformExcelToLucky支持的excel是啥格式,目前我只能使用input标签去选择excel文件来显示
后台返回数据的contentType设置为“application/vnd.ms-excel”,然后前端用var files = new File([blob], 你的文件名, { type: blob.type, lastModified: Date.now() }),这样应该就可以了,不过我目前测试下了超过文件大小超过50kb就需要等待很长时间才能打开
后端返回excel文件流,使用blob转换为file,LuckyExcel.transformExcelToLucky一直报这个错,有遇到的吗 Error: Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html at ZipEntries.readEndOfCentral (luckyexcel.umd.js?f7e6:6465:1) at ZipEntries.load (luckyexcel.umd.js?f7e6:6553:1) at eval (luckyexcel.umd.js?f7e6:3897:1)
同样的问题,你解决了嘛?
后端返回excel文件流,使用blob转换为file,LuckyExcel.transformExcelToLucky一直报这个错,有遇到的吗 Error: Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html at ZipEntries.readEndOfCentral (luckyexcel.umd.js?f7e6:6465:1) at ZipEntries.load (luckyexcel.umd.js?f7e6:6553:1) at eval (luckyexcel.umd.js?f7e6:3897:1)
同样的问题 请问您解决了吗
后端返回excel文件流,使用blob转换为file,LuckyExcel.transformExcelToLucky一直报这个错,有遇到的吗 Error: Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html at ZipEntries.readEndOfCentral (luckyexcel.umd.js?f7e6:6465:1) at ZipEntries.load (luckyexcel.umd.js?f7e6:6553:1) at eval (luckyexcel.umd.js?f7e6:3897:1)
请求配置responseType: 'blob'
已经配置了