
Provides a reference to the JavaScript file that defines custom functions. src/functions/functions.tsĬontains the code that defines custom functions. We'll concentrate on the files that are important to custom functions. If you use the Yeoman generator for Office Add-ins to create an Excel custom functions add-in project, it creates files which control your functions and task pane. Return Math.pow(radius, 3) * 4 * Math.PI / 3 The following code defines the custom function =MYFUNCTION.SPHEREVOLUME. In this example, the custom function =MYFUNCTION.SPHEREVOLUME calculates the volume of a sphere. The following animated image shows your workbook calling a function you've created with JavaScript or TypeScript.

volume-licensed perpetual versions of Office 2019 or earlier.Note that Excel custom functions are available on the following platforms.Įxcel custom functions are currently not supported in the following:
