Skip to content

Instantly share code, notes, and snippets.

View jipyua's full-sized avatar

MSFT-jipyua jipyua

View GitHub Profile
@jipyua
jipyua / Excel Testing (Office Add-in Playground).json
Created September 26, 2016 04:40
Excel Testing - Shared with Office Add-in Playground
{
"name": "Excel Testing",
"playgroundVersion": 1
}
@jipyua
jipyua / Word createDoucment.yaml
Created March 1, 2018 03:05
Shared with Script Lab
name: Word createDoucment
description: ''
author: jipyua
host: WORD
api_set: {}
script:
content: |
$('#file').change(createDocument);
@jipyua
jipyua / GetFileAsyncPPT.yaml
Last active March 6, 2018 05:34
Shared with Script Lab
name: GetFileAsyncPPT
description: ''
author: jipyua
host: POWERPOINT
api_set: {}
script:
content: |
$('#selectedFile').change(getFullFile);
function getFullFile() {
@jipyua
jipyua / ppt createDocument.yaml
Last active March 16, 2018 03:36
Shared with Script Lab
name: ppt createDocument
description: ''
author: jipyua
host: POWERPOINT
api_set: {}
script:
content: |-
$('#createppt').click(function () { createPPTDocument() });
function createPPTDocument() {
@jipyua
jipyua / XL createWorkbook.yaml
Last active March 27, 2018 02:34
This is the script to test the setting changed event - Shared with Script Lab
name: XL createWorkbook
description: This is the script to test the setting changed event
author: jipyua
host: EXCEL
api_set: {}
script:
content: |-
$('#createxl').click(function () { createXLDocument() });
function createXLDocument() {
var file = document.getElementById('myFile').files[0];
@jipyua
jipyua / Blank snippet - 1.yaml
Created April 25, 2018 09:46
Shared with Script Lab
name: Blank snippet - 1
description: ''
author: jipyua
host: WORD
api_set: {}
script:
content: |+
$("#run").click(async () => {
OfficeHelpers.Utilities.log('Start');
await run();
@jipyua
jipyua / Add & hide worksheet.yaml
Last active May 7, 2018 07:44
Shared with Script Lab
name: Add & hide worksheet
description: ''
author: jipyua
host: EXCEL
api_set: {}
script:
content: |
$("#add-worksheet").click(addWorksheet);
@jipyua
jipyua / Bugbash insertooxml.yaml
Last active May 14, 2018 09:37
Executes a basic Word API call using TypeScript. - Shared with Script Lab
name: Bugbash insertooxml
description: Executes a basic Word API call using TypeScript.
author: jipyua
host: WORD
api_set: {}
script:
content: |
var startwithinlinecc = "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<?mso-application progid=\"Word.Document\"?>\r\n<pkg:package xmlns:pkg=\"http://schemas.microsoft.com/office/2006/xmlPackage\"><pkg:part pkg:name=\"/_rels/.rels\" pkg:contentType=\"application/vnd.openxmlformats-package.relationships+xml\" pkg:padding=\"512\"><pkg:xmlData><Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"><Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"word/document.xml\"/></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name=\"/word/_rels/document.xml.rels\" pkg:contentType=\"application/vnd.openxmlformats-package.relationships+xml\" pkg:padding=\"256\"><pkg:xmlData><Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"
@jipyua
jipyua / Paint.yaml
Created June 9, 2018 11:35
Uses range formatting and external libraries to draw a colorful gradient within a range. Contributed by Alexander Zlatkovski. - Shared with Script Lab
name: Paint
description: Uses range formatting and external libraries to draw a colorful gradient within a range. Contributed by Alexander Zlatkovski.
author: jipyua
host: EXCEL
api_set: {}
script:
content: |-
$("#prepCanvas").click(prepCanvas);
$("#painting").click(startPainting);
var canvas, canvasCtx;
@jipyua
jipyua / Scroll to range.yaml
Created September 21, 2018 10:56
Shows how to scroll to a range with and without selection. - Shared with Script Lab
name: Scroll to range
description: Shows how to scroll to a range with and without selection.
author: jipyua
host: WORD
api_set: {}
script:
content: |-
$("#getrange").click(() => tryCatch(getRange));
$("#inserttext-crash").click(() => tryCatch(insertText));