[英]Javascript to cycle through each google sheet tab and copy and paste all cells as values only
I'm completely new to Javascript, so thanks in advance for the help with this as it'll significantly help get me into JS. 我对Java完全陌生,因此在此先感谢您的帮助,因为它将极大地帮助我进入JS。
What's needed: 需要什么:
Basically, get rid of all the formulas. 基本上,摆脱所有公式。 I use a lot of importrange data that is constantly updated. 我使用了大量的importrange数据,这些数据会不断更新。 At the end of closing the books, we need all that import stuff to stop and the tabs to be static. 在关闭书本的最后,我们需要停止所有导入的工作,并需要使选项卡为静态。
Someone on a google forum sent the answer. Google论坛上的某人发送了答案。 Thanks all. 谢谢大家
function removeFormulas() {
SpreadsheetApp.getActive().getSheets()
.forEach(function (sh) {
sh.getDataRange().setValues(sh.getDataRange().getDisplayValues())
})
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.