- window.onload = function () {
- var spread = new GcSpread.Sheets.Spread(document.getElementById('ss'), { sheetCount: 1 });
- var sheet = spread.getActiveSheet();
-
- sheet.setRowCount(2005);
- sheet.isPaintSuspended(true);
- sheet.suspendEvent();
- sheet.suspendCalcService();
-
- for (var i = 1; i < 2000; i++) {
- for (var j = 1; j < 21;j++) {
- sheet.setFormula(i, j, 'A1+A'+ (i + 1) + '+' + String.fromCharCode(j + 65) + '1');
- }
- }
- sheet.resumeCalcService();
- sheet.resumeEvent();
- sheet.isPaintSuspended(false);
- };
复制代码
然后再去添加两行:
- sheet.isPaintSuspended(true);
- sheet.suspendEvent();
- sheet.suspendCalcService();
-
- sheet.addRows(2, 2);
-
- sheet.resumeCalcService();
- sheet.resumeEvent();
- sheet.isPaintSuspended(false);
复制代码
|
|