将值和公式复制到Google脚本中的其他工作表 [英] Copy values and formulas to a different sheet in google script

查看:34
本文介绍了将值和公式复制到Google脚本中的其他工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将完整的数据从一张纸复制到另一张纸,包括所有值和所有公式.我的问题是我找不到同时执行两个setValues只是值的函数,setFormulas只是公式.有没有一种方法可以将所有这两种方法合并为一个副本,以便获得所有信息.如果它包含更好的格式信息.

I am trying to copy the full data from one sheet to another including all the values and all the formulas. The problem I have is that I cannot find a function that does both setValues is just the values, setFormulas just the formulas. Is there a way to combine both of these into a single copy so all the information comes across. if it includes the formatting information that would be even better.

谢谢

推荐答案

此帮助吗?它会复制整张纸吗?

Would this help? It duplicates an entire sheet?

https://developers.google.com/apps -script/reference/spreadsheet/sheet#copyTo(Spreadsheet)

,如果没有,您可以使用range的copyTo函数吗?

and if it doesn't, could you use the copyTo function of range?

https://developers.google.com/apps -script/reference/spreadsheet/range#copyTo(Range)

这篇关于将值和公式复制到Google脚本中的其他工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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