简体   繁体   中英

Export Google Spreadsheet and related scripts

I have a Google SpreadSheet with some custom scripts to do stuffs.

Is there a way to export the "bundle" (sheets+scripts), so that if I import the file (on another folder/Drive) I'll get a clone (sheets+scripts) of the original? Looks like it is possible to only export the SpreadSheet.

EDIT:

To better explain the scenario, I'd like to export spreadsheet+script to use a local version control system to better "log" my development. The Google script version control is not enough detailed for my purpose. If one can download/upload linked spreadsheet/script (also forma/script) it will be quite handy.

You can't really export/import your "bundle" like export it as file and import it again.

But when you make a copy of a spreadsheet, you also copy the script related to this sheet. So you can make a workaround by using the method to copy a file( copy() ), and change the owner of it ( setOwner() ). You'll keep the sheet with the script related and it will be transfered.

If the script is bound to the spreadsheet then any copies of the sheet will also have their own copies of the script. If you need to copy the sheet to a different GDrive account just share the sheet with that account (granting edit access) and the user of that account can make their own copy of the sheet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM