【问题标题】:Would it be possible to Merge 2 onEdit Google Script?是否可以合并 2 onEdit Google Script?
【发布时间】:2021-06-09 09:44:16
【问题描述】:

是否可以将它们合并到一个脚本中,因为我对编码了解不多,并且还可以在有人对工作表进行编辑时在下一个单元格中自动添加用户名/编辑者的姓名?**

尝试在此处粘贴代码,但我很难做到。

这是我的工作:https://docs.google.com/spreadsheets/d/16NBcSAyeUgVQVc4MfWJLSBBN_GqzP9YmdQPAf5oPJuI/edit?usp=sharing

【问题讨论】:

  • 请在您的问题中发布您的代码。
  • Google 告诉我 文件在所有者的垃圾箱中:这个问题仍然与您有关吗?

标签: google-apps-script merge timestamp dropdown


【解决方案1】:

是的,有可能

只需将您的两个函数重命名为 onEdit 并从单个 onEdit 函数中调用它们。

示例:

function onEdit(e){
  one(e);
  two(e);
}
function one(e){
  ...
}
function two(e){
  ...
}

【讨论】:

  • 你太棒了!它现在正在工作!非常感谢!!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多