您好,不好意思 是我搞错了 这个文字的框是在我导入的时候就消失了,包括打印设置的框都消失了,以下是我导入 时的代码
getTemplate() {
this.loading = true
this.closeLoadingTimer()
this.loadFile().then((file: any) => {
let excelIo = new Excel.IO();
excelIo.open(file, (json) => {
let workbookObj = json;
this.spread.fromJSON(workbookObj);
if (this.readonly) {
this.sharedimpservice.lockSpread(this.spread, this.sheet);
}
this.loadEnd = true
}, (error) => {
this.msg.error('导入异常' + error);
}, {});
});
}
loadFile() {
return new Promise((resolve) => {
// this.record.template_id
this.http.get(global.host + "/****/*****/download2",
{ id: this.record.template_id }, { responseType: 'blob' }).subscribe((data: any) => {
const blob = new Blob([data], { type: 'application/octet-stream' });
resolve(blob)
});
})
}
|