Skip to content

Instantly share code, notes, and snippets.

@kaibakker
Last active April 11, 2021 11:53
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 kaibakker/ecf5628caa1c90e91f7f12a21bd0cc52 to your computer and use it in GitHub Desktop.
Save kaibakker/ecf5628caa1c90e91f7f12a21bd0cc52 to your computer and use it in GitHub Desktop.
Calculates the volume of a sphere.
name: Basic custom function
description: Calculates the volume of a sphere.
host: EXCEL
api_set: {}
script:
content: |
/**
* Searches and creates snips for the results
* @customfunction
* @param {string} searchValue
* @param {string} scope -> filepath.pdf, filename.pdf, group, All Documents
* @returns searchValue if found
*/
async function SnipSearch(searchValue, scope) {
console.log("Cell is registered automated snip creation");
return searchValue;
}
/**
* Creates snip at certail location
* @customfunction
* @param filename
* @param pageNumber
* @param x
* @param y
* @param width
* @param height
* @returns newValue and has as sight effect that the cell will be transformed to a snip
*/
function SnipArea(filename, pageNumber, x, y, width, height) {
console.log("Cell is registered automated snip creation");
return "some value";
}
/**
* Create a snip by matching in scope
* @customfunction
* @param {string} value
* @param {string} scope
* @returns newValue and has as sight effect that the cell will be transformed to a snip
*/
function SnipMatch(value, scope) {
console.log("Cell is registered automated snip creation");
return value;
}
function DataSnipperXML() {
// just an idea
return "<xml></xml>";
}
language: typescript
libraries: |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
@types/office-js
core-js@2.4.1/client/core.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment