“加载...”的条件格式细胞 [英] Conditional formatting for "Loading..." cells

查看:91
本文介绍了“加载...”的条件格式细胞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有某种方法可以为等待计算的单元格加下划线或应用条件格式?

或者,有没有办法知道单元格是Loading ...在脚本中?

解决方案

不,条件格式和脚本都不知道 。细胞的状态。当脚本尝试访问正在计算的单元格的值时,脚本的执行将暂停,直到计算结束。我测试了一个人为的慢速自定义函数:

$ p $ function slow(a){
Utilities.sleep(20000) ;
返回2 * a;

输入 = slow(22)然后在该单元格上调用带有 getValue()的脚本将导致脚本运行很长时间,直到该函数完成并且脚本收到44作为单元格价值。


Is there some way to underline or apply a conditional formatting for cells waiting to be calculated?

Or, however, is there a way to know if a cell is "Loading..." in a script?

解决方案

No, neither conditional formatting nor scripts are aware of the "Loading..." condition of a cell. When a script attempts to access the value of a cell being calculated, the script's execution is paused until that calculation finishes. I tested this on an artificially slow custom function:

function slow(a) {
  Utilities.sleep(20000);
  return 2*a;
}

Entering =slow(22) and then invoking a script with getValue() on that cell results in the script running for a long time, until the function finishes and the script receives 44 as the cell's value.

这篇关于“加载...”的条件格式细胞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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