本文介绍了如何将制作电子表格的备份副本的脚本编写到存档文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张电子表格,我经常更新,每次做历史数据跟踪时都需要制作一份时间戳记。我有一个文件夹,可将副本保存到我的Google云端硬盘中。手动执行此操作随着时间的推移变得相当麻烦。

I've got a spreadsheet that I update regularly and I need to make a time-stamped copy of it each time I do for historical data tracking purposes. I have a folder that I save the copies to on my Google Drive. Doing this manually has become rather cumbersome over time.

我想要制作一份脚本,将电子表格中的当前时间和日期复制到电子表格中名称并将其保存到我的存档文件夹。我花了最近几个小时的时间和google搜索代码,看起来它可能做类似的事情,但没有管理任何实质性的东西。

I'd like to form a script that would make a copy of my spreadsheet with the current time and date in the spreadsheet name and save it to my archive folder. I've spent the last few hours dinking around with and googling code that looked like it might do something similar but haven't managed anything substantial.

任何有用的指针都是非常感谢。

Any helpful pointers would be greatly appreciated.

感谢。

推荐答案

/ p>

It's very simple:

DocsList.getFileById(SpreadsheetApp.getActiveSpreadsheet().getId()).makeCopy(SpreadsheetApp.getActiveSpreadsheet().getName() + "_copy");

这篇关于如何将制作电子表格的备份副本的脚本编写到存档文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 07:54