wxml: <view> <button type='primary' style='margin:20rpx' bindtap='downLoad'>.xlsx文档下载</button> </view> js: downLoad: function (e) { wx.downloadFile({ url: "https://testresource.dscq.com/group1/M00/01/95/rBACel2ByH2AHK8mAAA5J296xWg38.xlsx", // url: url, success: function (res) { console.log(res); var rr = res.tempFilePath; wx.openDocument({ filePath: rr, fileType: 'xlsx', success: function (res) { console.log('文档打开成功') }, fail: function (res) { console.log("文档打开失败") }, complete: function () { } }); }, complete: function () { } }) }
使用官方wx.openDocument方法,打开.xlsx文件时打不开,为什么?文件下载时,文件都能够正常下载,有返回文件临时路径。word,pdf格式的文件能够正常打开,但打开excel文件时打不开文件。官方的同学,能帮忙看看问题吗? [图片] word文档打开效果 [图片] excel文件打开效果
2019-09-23