Created
June 12, 2022 02:02
-
-
Save meokey/4dd01bc1e868ab4ad2e920933e2ad607 to your computer and use it in GitHub Desktop.
Calculates the volume of a sphere.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Basic custom function | |
description: Calculates the volume of a sphere. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
/** | |
* Calculates the volume of a sphere. | |
* @customfunction | |
* @param {number} radius | |
* @returns The volume of the sphere. | |
*/ | |
function sphereVolume(radius) { | |
return (Math.pow(radius, 3) * 4 * Math.PI) / 3; | |
} | |
language: typescript | |
libraries: | | |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js | |
@types/office-js | |
[email protected]/client/core.min.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment