wx.openDocument打不开文件怎么办?
exportRemXsl(e){ let header = { cookie: this .common.data.cookie, // 'content-type': "application/download" } wx.downloadFile({ url: app.globalData.serverUrl + 'common/exportRemXls?remId=' + e.target.dataset.id, header:header, success: function (res) { let filePath = res.tempFilePath; console.log(res) wx.openDocument({ fileType: 'xls' , filePath: filePath, success: function (res) { console.log( '打开文档成功' ) }, fail: function () { console.log( '失败' , res) } }) } }) }, |
后端java用HSSFWorkbook 生成的,安卓手机魅族16x ,微信是最新版本