本帖最后由 shawnfeng 于 2018-6-24 13:50 编辑
{errorCode: 1, errorMessage: "Incorrect file format."}
代码如下:
ImportFileStart() {
let _this = this;
var excelFile = this.$refs.fileDemo.files[0];
console.log(excelFile);
console.log("this.excelIO: ",this.excelIO);
this.excelIO.open(excelFile, function (json) {
var workbookObj = json;
this.spread.fromJSON(workbookObj); // 须将 this 变成_this ====》_this.spread.fromJSON(...)
}, function(e){
console.log(e);
});
},
|
|