1

I have program that generates a spreadsheet documenting experiment results. I have written an app script to calculate the results and do formatting on the sheet.
It is working for the first file but when another spreadsheet is used I want to run the same script on that also.
As I am unable to find any link to the script that I have written, I want to know how I can use the same script for different spreadsheet files.

1

1 Answer 1

1

You can convert your script in the first spreadsheet as a library and access it from the second. More information : https://developers.google.com/apps-script/guide_libraries

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for the response. But with the help of libraries I was able to copy and paste less and directly use the function from the library identifier. But still I have to create a seperate project for that spreadsheet and copy and paste the library id and then run. I was looking for like just run the function directly from the spreadsheet menu. Just like we do formatting. Is there something like that available without publishing the script. Thanks again.
Unfortunately no. You have to create a new project in each spreadsheet. However, you can have a blank spreadsheet with the code and make a copy of this spreadsheet so that the code is available in the new spreadsheet
Thanks. This Idea is better to create a blank spreadsheet and just copy it. Thanks a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.