Skip to content

Instantly share code, notes, and snippets.

View Zlatkovsky's full-sized avatar

Michael Zlatkovsky Zlatkovsky

  • Microsoft
  • Redmond, WA
View GitHub Profile
name: 'Find available range (SO:50640779)'
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
@Zlatkovsky
Zlatkovsky / Custom Function Demo.yaml
Last active May 3, 2018 03:40
Shared with Script Lab
name: 'Custom Function Demo'
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
/** @CustomFunction */
async function randomComment(id: number, fieldName: string): Promise<string> {
let result = await (await fetch(`https://jsonplaceholder.typicode.com/comments/${id}`)).json();
name: 'Get table intersection (StackOverflow:39729658)'
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
@Zlatkovsky
Zlatkovsky / Kiwi starter.yaml
Last active February 9, 2018 21:21
Shared with Script Lab
name: Kiwi starter
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
name: Table slow-perf workaround
description: 'https://github.com/OfficeDev/office-js/issues/12'
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |+
wireUp("#setup", setup);
wireUp("#run1", run1);
name: Color Converter (Custom Function)
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |+
/** @customfunction */
function toHex(input: string): string {
return getColorOrInvalid(input, "toHexString");
@Zlatkovsky
Zlatkovsky / Merge namespaces.yaml
Created October 3, 2017 04:52
Shared with Script Lab
name: Merge namespaces
description: ''
author: Zlatkovsky
host: WEB
api_set: {}
script:
content: |
$("#run").click(run);
function run() {
@Zlatkovsky
Zlatkovsky / Population analysis - JS ES5 (from "Building Office Add-ins").yaml
Last active August 27, 2017 03:52
Demonstrates a canonical Excel automation scenario using Office.js. - Shared with Script Lab
name: Population analysis - JS ES5 (from "Building Office Add-ins")
description: Demonstrates a canonical Excel automation scenario using Office.js.
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(runAnalysis);
$("#setup").click(setupPopulationData);
@Zlatkovsky
Zlatkovsky / Population analysis - single function (from "Building Office Add-ins").yaml
Last active January 15, 2019 15:45
Demonstrates a canonical Excel automation scenario using Office.js. - Shared with Script Lab
name: Population analysis - single function (from "Building Office Add-ins")
description: Demonstrates a canonical Excel automation scenario using Office.js.
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(runAnalysis));
$("#setup").click(() => tryCatch(setupPopulationData));
@Zlatkovsky
Zlatkovsky / Gradient.yaml
Created August 22, 2017 19:52
Uses range formatting and external libraries to draw a colorful gradient within a range. Modified from sample by Alexander Zlatkovski. - Shared with Script Lab
name: Gradient
description: Uses range formatting and external libraries to draw a colorful gradient within a range. Modified from sample by Alexander Zlatkovski.
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |-
initializeColorPickers();
// Set up the click handler: