您好,收到新的Spread.Sheets.Production.10.3.1版本,似乎导出后的文件还是有这个问题
- var spread = GC.Spread.Sheets.findControl($('#ss')[0]);
- //var loadingIndex = layer.load(1, { shade: [0.4] });
- var json = JSON.stringify(spread.toJSON({ includeBindingSource: true }));
- var tempSpread = new GC.Spread.Sheets.Workbook();
- tempSpread.fromJSON(JSON.parse(json));
- var shCount = tempSpread.getSheetCount();
- for (var i = 0; i < shCount; i++) {
- var sheet = tempSpread.getSheet(i);
- var rowCount = sheet.getRowCount(), colCount = sheet.getColumnCount();
- // 清除公式
- for(var i = 0; i < rowCount; i++){
- for(var j = 0; j < colCount; j++){
- sheet.setFormula(i, j, undefined);
- }
- }
- }
-
- //获取处理后的json
- json = tempSpread.toJSON();
- var excelIo = new GC.Spread.Excel.IO();
- excelIo.save(json, function (blob) {
- });
复制代码
|