How to call an Apps Script library function in Google Sheet

∥☆過路亽.° 提交于 2021-02-10 22:15:52

问题


I created a Library in Google script as a standalone script with a function function1. I published a version of this script.

I also have a spreadsheet, and using a bound script, I added my library with identifier XXXX and managed to launch from scripts.google.com the function using a wrapper around function1 and logging the results :

function function2()
{
  return XXXX.function1();
}

function test()
{
  Logger.log(function2());
}

The problem is I cannot call this function from a cell in the spreadsheet. I get the error

Library with identifier XXXX is missing (perhaps it was deleted, or you don't have read access?) (ligne 0).

I am the owner of the scripts and the spreadsheet.

来源:https://stackoverflow.com/questions/63552423/how-to-call-an-apps-script-library-function-in-google-sheet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!