Posted 22 March 2021, 11:46 pm EST
Hi,Scrolling / moving in sheet is very slow in certain templates. Attached an excel that is very slow.
TestFile.zip
Forums Home / Spread / SpreadJS Topics
Posted by: petri.rasanen on 22 March 2021, 11:46 pm EST
Posted 22 March 2021, 11:46 pm EST
Hi,Replied 23 March 2021, 9:00 pm EST
Hi,Marked as Answer
Replied 27 March 2021, 10:24 pm EST
Hi,
Object.keys(json.sheets).forEach(function (key) {
var sheet = json.sheets[key], ruleMap = {};
if (sheet.conditionalFormats && sheet.conditionalFormats.rules) {
var rules = sheet.conditionalFormats.rules;
rules.forEach(function (rule) {
var key = rule.formula + "_" + JSON.stringify(rule.style);
if (ruleMap[key]) {
ruleMap[key].ranges = ruleMap[key].ranges.concat(rule.ranges);
} else {
ruleMap[key] = rule;
}
});
}
let newRules = [];
Object.keys(ruleMap).forEach(function(key){
newRules.push(ruleMap[key]);
});
sheet.conditionalFormats.rules = newRules;
});