|
@@ -12,6 +12,8 @@ const SpreadExcelObj = (function() {
|
|
|
const _createHideSpread = function () {
|
|
|
const div = document.createElement("div");
|
|
|
div.setAttribute('id', 'exportExcelSpread');
|
|
|
+ // $(div).css("position", "absolute").css('top', 0).css('left', 0).css('height', 300).css('width', 500).css('z-index', 999);
|
|
|
+ // document.body.insertBefore(div, null);
|
|
|
div.style.display = 'none';
|
|
|
return div;
|
|
|
};
|
|
@@ -35,6 +37,8 @@ const SpreadExcelObj = (function() {
|
|
|
|
|
|
const spread = SpreadJsObj.createNewSpread(div);
|
|
|
const sheet = spread.getActiveSheet();
|
|
|
+
|
|
|
+ SpreadJsObj.beginMassOperation(sheet);
|
|
|
sheet.options.isProtected = false;
|
|
|
sheet.setColumnCount(setting.cols.length);
|
|
|
sheet.setRowCount(setting.headRows + data.length);
|
|
@@ -79,6 +83,7 @@ const SpreadExcelObj = (function() {
|
|
|
cell.hAlign(col.hAlign);
|
|
|
}
|
|
|
}
|
|
|
+ SpreadJsObj.endMassOperation(sheet);
|
|
|
|
|
|
const excelIo = new GC.Spread.Excel.IO();
|
|
|
const sJson = JSON.stringify(spread.toJSON());
|