Skip to content

Instantly share code, notes, and snippets.

View jakobpn's full-sized avatar

Jakob Nielsen-MSFT jakobpn

  • Microsoft
  • Redmond, WA
View GitHub Profile
@jakobpn
jakobpn / Workbook and worksheet collection events.EXCEL.yaml
Created November 18, 2022 17:38
Registers event handlers that run when a worksheet is added, activated, or deactivated, or when the settings of a workbook are changed.
name: Workbook and worksheet collection events
description: >-
Registers event handlers that run when a worksheet is added, activated, or
deactivated, or when the settings of a workbook are changed.
host: EXCEL
api_set: {}
script:
content: >
$("#register-on-add-handler").click(() => tryCatch(registerOnAddHandler));
@jakobpn
jakobpn / Create Table.EXCEL.yaml
Created November 6, 2022 19:03
Create a new snippet from a blank template.
name: Create Table
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) => {
@jakobpn
jakobpn / Filter Range on Color.EXCEL.yaml
Created October 26, 2022 21:34
Create a new snippet from a blank template.
name: Filter Range on Color
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) => {
@jakobpn
jakobpn / Filter Range on Color.EXCEL.yaml
Created October 26, 2022 21:22
Create a new snippet from a blank template.
name: Filter Range on Color
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) => {
@jakobpn
jakobpn / Get data sources for all PivotTables.EXCEL.yaml
Created October 25, 2022 18:15
Create a new snippet from a blank template.
name: Get data sources for all PivotTables
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) => {
@jakobpn
jakobpn / Traverse Chart Axis.EXCEL.yaml
Last active October 14, 2022 22:01
Create a new snippet from a blank template.
name: Traverse Chart Axis
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) => {
@jakobpn
jakobpn / Traverse chart properties.EXCEL.yaml
Created October 14, 2022 18:34
Create a new snippet from a blank template.
name: Traverse chart properties
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) => {
@jakobpn
jakobpn / Using isNullObject property.EXCEL.yaml
Created October 14, 2022 18:19
Create a new snippet from a blank template.
name: Using isNullObject property
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) => {
@jakobpn
jakobpn / Data types: Custom functions.EXCEL.yaml
Last active May 4, 2022 20:44
This sample shows how to write custom functions that return data types.
name: 'Data types: Custom functions'
description: This sample shows how to write custom functions that return data types.
host: EXCEL
api_set: {}
script:
content: >
/**
* Search for products that match a given substring.
* @customfunction
* @param search The string to search on
@jakobpn
jakobpn / Data types: Entity values with references.EXCEL.yaml
Last active May 9, 2022 18:29
This sample shows how to create entity values with references to other entity values.
name: 'Data types: Entity values with references'
description: >-
This sample shows how to create entity values with references to other entity
values.
host: EXCEL
api_set: {}
script:
content: >
$("#setup").click(() => tryCatch(setup));