cut & paste on Chrome with scripts - google-chrome

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)
How does cut & paste work on Chrome and should this also copy any apps script?
Should I be using the web clipboard if still available and if so where is it?

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

Related

Copying a Google Sheet and the existing script to a new sheet

I have a google sheet that I am currently copying into a new file. I was wondering if it is possible to also copy the the Google Script that is associated with the sheet. Basically I have a button that activates some script and I would like that button and associated script to be copied over as well. Currently the button copies but when hitting it, it says the ScriptFunction could not be found. Does anyone have any ideas or know if this is possible?

Troubleshooting a Script, to copy a sheet to multiple spreadsheets in Google Drive?

I am a total noobie such that I am not entirely sure how to ask this question. I used this walkthrough and script to try to copy a sheet to multiple spreadsheets in a folder in Google Drive: https://www.youtube.com/watch?v=K3pE7ENwjpQ
This video shows how to copy one sheet to multiple spreadsheets at the same time. The link to the script is here: https://script.google.com/u/2/home/projects/1XlgYs8056jvq4dbfaEMxCgmu9L0epXGvfVZ29tx_5-jN-tNcYwhwmjtX/edit
I followed the instructions in the video to input the tab # of the tab to be copied into the script (tried multiple versions, like including and excluding hidden tabs, etc.) and changed the title of the copied tab as mentioned in the video.
However, running the script in a test folder, the tabs weren't copied over into the spreadsheets in that folder. Can anyone provide any tips for troubleshooting or updating the script to make it function as intended to copy a sheet to all spreadsheets within a Google Drive folder?
Please help!

Hide formula bar in google sheets

I want to achieve the following:
I do not want other users of the sheet to access the formula bar for certain cells/sheets of the spreadsheet
I want to block them from accessing the script editor (do not want to show the code) used for this sheet
I do not want other users of the sheet to access the formula bar for certain cells/sheets of the spreadsheet
This is not possible.
You could publish your spreadsheet but this will not allow to edit any content, or to use Google Forms, but this will allow respondents only to submit data, not to view the result of calculations.
To securely hide the formulas they should be in another spreadsheet. You could use IMPORTRANGE or a script to import/export the calculations result. Bear in mind that IMPORTRANGE isn't recalculated immediately and that scripts could be slower than built-in functions.
An alternative is to create a web app that makes the calculations and call it from a custom function.
I want to block them from accessing the script editor (do not want to show the code) used for this sheet
It's not possible to block editors to access the Script editor. For details see
Scripts Bound to Google Sheets, Docs, or Forms. To prevent that viewers get access to the code, block the spreadsheet for making a copy. For details see Change your sharing settings
You can set permissions per cell:
- Click the cell
- Left-mouse click or Ctrl+click -> menu 'Protect range'
- Click 'Set Permissions' in sidebar
- Select Only You
Now the content is still visible.
There is a work-around for this, which is quite complicated.
- Create another sheet, called Formulas.
- Protect this sheet the same way above.
- In your main sheet you can refer to formulas in the other sheet: =Formulas!B1
- Now you can write the formula in this cell B1 in sheet Formulas
=Sheet1!B1+Sheet1!C1-Sheet1!D1 (where Sheet1 is the name of the first sheet)
- Now hide the Formulas sheet

How do I copy a script from one spreadsheet to another spreadsheet?

I need to copy an existing script, which I did not write, into my existing spreadsheet. The script is called "SaveBack", and can be found here: https://docs.google.com/a/levelgroup.com/spreadsheet/ccc?key=0Agcb8bUVVOOodHhoV3BrRGZ6UEdSYnVLSEk3bllxRnc#gid=1.
My existing spreadsheet is too complex (it has many other spreadsheets that link to it) to copy all of its sheets into the spreadsheet that contains the script. I have already copied the SaveBack editor sheet template sheet to my main spreadsheet, but I can't figure out how to copy the SaveBack script that goes along with it into my spreadsheet.
Can anyone help? Thanks!
Open the save back script, select the script text, copy it, go to your sheet, create a new script (blank template), paste the script you copied into your new script, name is SaveBack (assuming it's a project), check the triggers on the original script and make sure your triggers match, and you should be good to go. You will have to change any sheet, document, or other string ID's to match your files' Id's, but that isn't too bad.
I do this sort of thing all of the time when I'm migrating things back and forth between my work and personal account. You could also create a copy of the other person's spreadsheet that you linked above, and it will move the script over with it. Then you can go to the script and get the project key to use it as library in your own scripts. Since you're using your copy as the library, you don't have to worry about someone else changing the script and breaking your functionality.

Copy Google Apps Script from template spreadsheet

I created a template spreadsheet which had a Google Apps Script embedded in it. I called it "Master Script". Then I created a copy of the template and noticed that the script also got copied over as "Copy of Master Script".
However, recently I observed that the master script is not getting copied over. Did Google make a change to disable the copy of the master script? How can I get this functionality back again now?
I don't believe there have been any changes. I've noticed that some of my copies don't copy scripts over properly. It gives some kind of error ("There was a problem with the copy" or something), and that seems to be consistent from my POV when scripts aren't copied. If you notice it consistently I would open an issue with Google Apps Script issue log