Skip to content

Instantly share code, notes, and snippets.

View akrantz's full-sized avatar

Adam Krantz akrantz

View GitHub Profile
@akrantz
akrantz / Custom Function returns a Promise.EXCEL.yaml
Last active July 19, 2019 20:33
A custom function which returns a Promise
name: Custom Function returns a Promise
description: A custom function which returns a Promise
host: EXCEL
api_set: {}
script:
content: |
/**
* Async custom function
* @customfunction
*/
@akrantz
akrantz / Add binding for selected range.EXCEL.yaml
Last active July 21, 2023 17:35
Adds a new binding for the selected range.
name: Add binding for selected range
description: Adds a new binding for the selected range.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {
@akrantz
akrantz / Work with tags.POWERPOINT.yaml
Last active August 10, 2023 23:00
Use tags to process subsets of slides.
name: Work with tags
description: Use tags to process subsets of slides.
host: POWERPOINT
api_set: {}
script:
content: >
$("#add-selected-slide-tag").click(() => tryCatch(addTagToSelectedSlide));
$("#delete-slides-by-audience").click(() =>
tryCatch(deleteSlidesByAudience));
@akrantz
akrantz / Data types: Formatted numbers.EXCEL.yaml
Created July 26, 2023 21:47
This sample shows how to set and get data types using the formatted number properties.
name: 'Data types: Formatted numbers'
description: >-
This sample shows how to set and get data types using the formatted number
properties.
host: EXCEL
api_set: {}
script:
content: >-
$("#setup").click(() => tryCatch(setup));