How to call library function as custom function from spreadsheet formula?

前端 未结 1 1660
Happy的楠姐
Happy的楠姐 2021-01-16 12:53

This might be the same root cause as in How to call a library function from a spreadsheet drop-down menu generated by the same library, but I still wanted to throw it out

1条回答
  •  长发绾君心
    2021-01-16 13:31

    The solution is to create a function on you Google Apps Script project that calls the library function

    /**
     * Description of what your function does
     *  
     * @customfunction
     */
    function ReturnParam(theParameter){
      return myLib.ReturnParam(theParameter);
    }
    

    Then you could call it from your spreadsheet as a custom function

    =ReturnParam(4)
    

    0 讨论(0)
提交回复
热议问题