Copy values and formulas to a different sheet in google script

无人久伴 提交于 2020-04-21 15:54:35

问题


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.

Thanks


回答1:


Would this help? It duplicates an entire sheet?

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

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

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



来源:https://stackoverflow.com/questions/38996666/copy-values-and-formulas-to-a-different-sheet-in-google-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!