重写copySheet命令(自定义扩展):
const originalCopy = GC.Spread.Sheets.Commands.copySheet.execute;
GC.Spread.Sheets.Commands.copySheet.execute = function(context, options) {
// 执行前逻辑
originalCopy.call(this, context, options);
// 执行后逻辑
console.log("工作表拷贝完成");
}; |