Skip to content

Instantly share code, notes, and snippets.

Avatar

MSFT-jipyua jipyua

View GitHub Profile
@jipyua
jipyua / AutoTimer (1).EXCEL.yaml
Created Apr 19, 2021
Create a new snippet from a blank template.
View AutoTimer (1).EXCEL.yaml
name: AutoTimer (1)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#reg").click(() => tryCatch(registerCalEvent));
$("#cal").click(() => tryCatch(reCalculate));
$("#stop").click(() => tryCatch(stopTiming));
@jipyua
jipyua / AutoTimer.EXCEL.yaml
Created Apr 6, 2021
Create a new snippet from a blank template.
View AutoTimer.EXCEL.yaml
name: AutoTimer
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#reg").click(() => tryCatch(registerCalEvent));
$("#setvalue").click(() => tryCatch(setValue));
var t0;
async function setValue() {
@jipyua
jipyua / Basic API call (TypeScript).WORD.yaml
Created Mar 17, 2021
Performs a basic Word API call using TypeScript.
View Basic API call (TypeScript).WORD.yaml
name: Basic API call (TypeScript)
description: Performs a basic Word API call using TypeScript.
host: WORD
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
// Gets the current selection and changes the font color to red.
@jipyua
jipyua / Insert external worksheets.EXCEL.yaml
Last active Dec 11, 2020
Inserts worksheets from another workbook into the current workbook.
View Insert external worksheets.EXCEL.yaml
name: Insert external worksheets
description: Inserts worksheets from another workbook into the current workbook.
host: EXCEL
api_set: {}
script:
content: |
$("#file").change(getFileBase64);
$("#run").click(() => tryCatch(run));
@jipyua
jipyua / WorkSheetCollection.AddFromBase64().EXCEL.yaml
Last active Apr 17, 2020
Sample code for WorkSheetCollection.AddFromBase64()
View WorkSheetCollection.AddFromBase64().EXCEL.yaml
name: WorkSheetCollection.AddFromBase64()
description: Sample code for WorkSheetCollection.AddFromBase64()
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(getExcelFileBase64));
function getExcelFileBase64() {
var file = document.getElementById("myFile").files[0];
@jipyua
jipyua / Basic API call (Office 2013).POWERPOINT.yaml
Created Dec 2, 2019
Executes a basic PowerPoint API call using the "common API" syntax (compatible with Office 2013).
View Basic API call (Office 2013).POWERPOINT.yaml
name: Basic API call (Office 2013)
description: >-
Executes a basic PowerPoint API call using the "common API" syntax (compatible
with Office 2013).
host: POWERPOINT
api_set: {}
script:
content: |
$("#run").click(run);
@jipyua
jipyua / OnDataChangedEventTest.EXCEL.yaml
Created Oct 14, 2019
This is the script to test onDataChanged event
View OnDataChangedEventTest.EXCEL.yaml
name: OnDataChangedEventTest
description: 'This is the script to test onDataChanged event '
host: EXCEL
api_set: {}
script:
content: >
$("#run").click(() => tryCatch(run));
$("#register-data-changed-handler").click(() =>
@jipyua
jipyua / XL createWorkbook.EXCEL.yaml
Created Mar 19, 2019
This is the script to test the setting changed event
View XL createWorkbook.EXCEL.yaml
name: XL createWorkbook
description: This is the script to test the setting changed event
host: EXCEL
api_set: {}
script:
content: |
$("#createxl").click(function() {
createXLDocument();
});
function createXLDocument() {
@jipyua
jipyua / Blank snippet (1).EXCEL.yaml
Created Mar 5, 2019
Create a new snippet from a blank template.
View Blank snippet (1).EXCEL.yaml
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) => {
@jipyua
jipyua / SaveClose (1).EXCEL.yaml
Created Jan 23, 2019
Create a new snippet from a blank template.
View SaveClose (1).EXCEL.yaml
name: SaveClose (1)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#save").click(() => tryCatch(save));
$("#close").click(() => tryCatch(close));
$("#autosave").click(() => tryCatch(autoSave));
$("#previouslysaved").click(() => tryCatch(previouslySaved));