5

I have 200+ spreadsheet that our customers fill. I developed a script to manage the spreadsheets which is basically identical in function.

The problem is when I modify the script I need to change it in all these sheets. I tried using libraries but with no success and I hoping to hear if someone knows an answer.

The library version I include (with development on) in each spreadsheet does not show the change ensued. It will only show the results at the time of inclusion, which means that in order to make this work I have to go to each of the spreadsheets, remove the library and re-install the most recent version. The updated library only works from my owner's account. The library is of course shared by anyone who has a link. Running a library's updated function in any of the spreadsheets produce an error: "TypeError: Cannot find function FunctionName in object [object Object]. (line 2, file "test")"

Is there a good way to have all spreadsheets same one code that I can change whenever I wish?

4
  • 1
    Your library needs "Anyone can edit" sharing permission if that's not already set, but are you able to share some sample code from your library and slave scripts that isn't getting updated?
    – Bryan P
    Apr 4, 2013 at 3:17
  • 1
    Seems like this is not yet possible: stackoverflow.com/questions/10500764/…
    – opowell
    Apr 4, 2013 at 23:35
  • 1
    I suggest we all go star this issue: code.google.com/p/google-apps-script-issues/issues/…
    – opowell
    Apr 4, 2013 at 23:47
  • @BryanP The script file "ManifestManager" has the following: function ShowMessage(){ Browser.msgBox("You have correct settings") } </pre> In the spreadsheet function myFunction() { ManifestManager.ShowMessage() } The output shows a message box "You have correct settings." If I deleted the entire function "ShowMessage" the reference to the library ManifestManager.ShowMessage() would still show the message box even if the function has been deleted Apr 6, 2013 at 0:21

2 Answers 2

1

You should turn on "development mode". Resources -> libraries included for each spreasheet that include the library

1
  • "development mode" is on. It does not do anything actually. Apr 6, 2013 at 0:21
0

I have not had much success using library myself.

One solution I would suggest would be to use a standalone script. If the spreadsheets have identical features, you can run the script on all of them using a for loop.

You can get an array of files inside a folder using using getFiles()

// Logs the number of files in the 'kittens' folder
 var folder = DocsList.getFolder('kittens');
 var files = folder.getFiles();
 Logger.log(files.length);

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.