var json = spread.toJSON({ includeBindingSource: true });
// here is excel IO API
me.excelIo.save(json, function (blob) {
saveAs(blob, "111.xlsx");
}, function (e) {
// process error
console.log(e);
}, { password: password });
saveAs(blob, "111.xlsx");已经给予了后缀名,但导出的时候并没有按照这个(111.xlsx)名称来导出,这是为什么
excelIo.save(json, function (blob) {
//saveAs(blob, "111.xlsx");
//解决浏览器兼容性问题
var objectUrl = window.URL.createObjectURL(blob);
var a = document.getElementById('downList');
a.href = objectUrl;
a.download = fileName;
a.click();
}, function (e) {
// process error
console.log(e);
}, { password: password });原因是浏览器兼容问题,在360和谷歌上不好用,添加以上代码后,可以下载成功,不过用wps打开可以,excel会有安全提示弹框