本帖最后由 Joestar.Xu 于 2024-7-4 15:05 编辑
了解了,SpreadJS也可以根据选取的范围手动进行计算,不知道能不能满足您的需求:
function calculateSelection(spread) {
let sheet = spread.getActiveSheet();
let range = `'${sheet.name().replaceAll("'", "''")}'!`+GC.Spread.Sheets.CalcEngine.rangeToFormula(sheet.getSelections()[0]);
spread.calculate(GC.Spread.Sheets.CalculationType.all, range);
}
参考:https://gcdn.grapecity.com.cn/fo ... d=203099&pid=763236 |