使用应用程序脚本在Google电子表格中显示更新的单元格值 [英] Display the updated cell values in google spreadsheet using app script

查看:42
本文介绍了使用应用程序脚本在Google电子表格中显示更新的单元格值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在google app脚本中有一个函数可以更改列中单元格的值.

I have a function in google app script which changes the values of cells in a column.

var values = SpreadsheetApp.getActiveSheet().getDataRange().getValues()
for (var i = 1; i <= values.length; i++) {
    var fileId = values[i-1][1];
    var body = someOeration(fileId)
    SpreadsheetApp.getActiveSheet().getRange(i, 3).setValue(body);
}

一切正常,但是一旦执行了完整的代码,电子表格中的值就会更新.我想在每次for循环执行之后而不是整个执行之后查看更改后的单元格值.

Everything runs fine but values in spreadsheet gets updated once the complete code is executed. I want to see the changed cell value after every for loop execution and not the complete execution.

推荐答案

根据文档

这篇关于使用应用程序脚本在Google电子表格中显示更新的单元格值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆