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: QRCode
description: ''
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {
name: Get OOXML
description: ''
host: WORD
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
// Gets the current selection and changes the font color to red.
name: Add content controls
description: ''
host: WORD
api_set: {}
script:
content: >
$("#run").click(() => tryCatch(run));
async function run() {
@Zlatkovsky
Zlatkovsky / CF Python Demo.EXCEL.yaml
Created May 3, 2019 22:21
A basic Custom Function, written in Python
name: CF Python Demo
description: 'A basic Custom Function, written in Python'
host: EXCEL
api_set: {}
script:
content: |-
import customfunctions as cf
@cf.customfunction("ADD")
def myadd(x, y):
@Zlatkovsky
Zlatkovsky / Blank snippet (1).EXCEL.yaml
Created April 23, 2019 17:14
Create a new snippet from a blank template.
name: Blank snippet (1)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {
@Zlatkovsky
Zlatkovsky / StreamingCounter.yaml
Last active October 4, 2018 02:18
Shared with Script Lab
name: StreamingCounter
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |-
/** @customfunction */
function increment(
incrementBy: number,
@Zlatkovsky
Zlatkovsky / Stock Price.yaml
Last active October 4, 2018 02:17
Shared with Script Lab
name: Stock Price
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |-
/** @customfunction */
function stockPrice(ticker: string): Promise<number> {
var url = "https://api.iextrading.com/1.0/stock/" + ticker + "/price";
@Zlatkovsky
Zlatkovsky / Get all charts on workbook.yaml
Created August 23, 2018 23:24
Shared with Script Lab
name: Get all charts on workbook
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
// Remember to include:
// lodash
// @types/lodash
name: Check if selection intersects with table(s)
description: ''
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |-
$("#run").click(() => tryCatch(run));
async function run() {
@Zlatkovsky
Zlatkovsky / Custom Functions demo.yaml
Last active September 25, 2018 02:12
toHexColor and getSentiment - Shared with Script Lab
name: Custom Functions demo
description: toHexColor and getSentiment
author: Zlatkovsky
host: EXCEL
api_set: {}
script:
content: |
/** @customfunction */
function toHexColor(input: string): string {
try {