小编Cyb*_*sKO的帖子

.setValue 仅在脚本完成时执行

D 我的脚本有问题。我的脚本的一部分:

    var a = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("A");
    var b = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("B");

    a.getRange("A14").setValue("external File");
    Utilities.sleep(2000);
    a.getRange("A14:C29").copyTo(b.getRange("A1:C15"), {contentsOnly:true});
    a.getRange("A14:C29").clearContent();
Run Code Online (Sandbox Code Playgroud)
现在我唯一的问题是,不会设置值(“外部文件”),我的脚本在脚本停止时首先设置此值。是否有可能的方法来解决它,请保持它 eZ 我在谷歌脚本中不是那么好:-D

google-sheets google-apps-script

4
推荐指数
1
解决办法
1431
查看次数

标签 统计

google-apps-script ×1

google-sheets ×1