Skip to content

Instantly share code, notes, and snippets.

@MiaofeiWang
Last active September 13, 2023 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MiaofeiWang/aa1ce0a5f25a7d31aa79f6c7c703468d to your computer and use it in GitHub Desktop.
Save MiaofeiWang/aa1ce0a5f25a7d31aa79f6c7c703468d to your computer and use it in GitHub Desktop.
Few custom functions for test
name: MyCFs
description: Few custom functions for test
host: EXCEL
api_set: {}
script:
content: |
/**
* @customfunction
* @return {number} random number between 1-6
*/
async function dice6() {
return Math.floor(Math.random() * 6 + 1);
}
/**
* @customfunction
* @param {any[][]} input input range
* @return {any[][]} echo the input
*/
async function EchoRange(input: any[][]) {
return input;
}
language: typescript
libraries: |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
@types/office-js
office-ui-fabric-js@1.4.0/dist/css/fabric.min.css
office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css
core-js@2.4.1/client/core.min.js
@types/core-js
jquery@3.1.1
@types/jquery@3.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment