你好,可以添加两个Workbook,在页面上初始化两个workbook
参考以下代码:
<gc-spread-sheets
(workbookInitialized)="workbookInit($event)"
id="ss">
<gc-worksheet [name]="sheetName"></gc-worksheet>
</gc-spread-sheets>
<gc-spread-sheets
(workbookInitialized)="workbookInit1($event)"
id="ss">
<gc-worksheet [name]="sheetName"></gc-worksheet>
</gc-spread-sheets>
workbookInit(args){
let spread:GC.Spread.Sheets.Workbook = args.spread;
let sheet = spread.getActiveSheet();
sheet.getCell(0,0).text("My SpreadJS Angular Project").foreColor("blue");
this.spread = spread;
}
workbookInit1(args){
let spread1:GC.Spread.Sheets.Workbook = args.spread;
let sheet1 = spread1.getActiveSheet();
sheet1.getCell(0,0).text("My SpreadJS Angular Project").foreColor("blue");
this.spread1 = spread1;
} |