Search code examples
google-chromegoogle-apps-scriptgoogle-drive-apicopy-paste

cut & paste on Chrome with scripts


I'm trying to copy the contents of a sheet from one spreadsheet to another spreadsheet, both on My Drive using Ctrl-C & Ctrl-V.

It copies the cell values and color but not the data validation or charts (I have tried paste special)

  1. How does cut & paste work on Chrome and should this also copy any apps script?

  2. Should I be using the web clipboard if still available and if so where is it?


Solution

  • If you do the copy & paste from the Google Drive web UI to copy a spreadsheet, the whole file including the bounded scripts will be copied.

    By the other hand, if you copy the spreadsheet content (some cells or all the cells in a sheet) and try to paste them to other spreadsheet, not all the source features will be included. Since the scripts aren't bounded to a specific cell either to a sheet, using copy & paste from the Google Sheets UI (web or mobile) will not include the scripts.

    To include the data validations and other missing features with exception of the scripts due to what was explained above, instead of doing a copy & pase copy the sheet to the destination spreadsheet. To do this, you could click the dropdown menu on the sheet tab, then select Copy > New spreadsheet / Copy > Existent spreadsheet