var sp = GC.Spread.Sheets.findControl($('#ss')[0]);
var co = sp.getSheetCount();
for (var i = 0; i < co; i++) {
var sh = sp.getSheet(i);
for (var r = 3; r < sh.getRowCount(); r++) {
for (var c = 3; c < sh.getColumnCount(); c++) {
if (sh.hasFormula(r,c)) {
var v = sh.getValue(r,c);
sh.setFormula(r,c,'');
sh.setValue(r,c, v);
}
}
}
}
var exportObj = sp.toJSON({ includeBindingSource: true });
var json = JSON.stringify(exportObj);
excelIo.save(json, function (blob) {
console.log('ok');
});
这样循环太卡了,麻烦看一下
|