Skip to content

Instantly share code, notes, and snippets.

View lumine2008's full-sized avatar

Raymond lumine2008

  • Microsoft
  • Beijing
View GitHub Profile
@lumine2008
lumine2008 / Workbook CustomProperties.EXCEL.yaml
Created July 15, 2019 07:44
Gets and sets document properties.
name: Workbook CustomProperties
description: Gets and sets document properties.
host: EXCEL
api_set: {}
script:
content: >
$("#set-doc-properties").click(() => tryCatch(setDocProperties));
$("#get-doc-properties").click(() => tryCatch(getDocProperties));
@lumine2008
lumine2008 / Detect Cell Type .EXCEL.yaml
Created July 15, 2019 07:49
Get the cell value type of a range.
name: 'Detect Cell Type '
description: Get the cell value type of a range.
host: EXCEL
api_set: {}
script:
content: |
$("#setup").click(() => tryCatch(setup));
$("#getValueType").click(() => tryCatch(getValueType));
let completeMatch = false;
name: ValueFormatting
description: Formats a range.
host: EXCEL
api_set: {}
script:
content: |
$("#get-number-format").click(() => tryCatch(getNumberFormat));
$("#get-currency").click(() => tryCatch(getCurrency));
$("#get-date").click(() => tryCatch(getDate));
$("#get-time").click(() => tryCatch(getTime));
@lumine2008
lumine2008 / ValueFormatting.EXCEL.yaml
Last active July 23, 2019 22:32
Formats a range.
name: ValueFormatting
description: Formats a range.
host: EXCEL
api_set: {}
script:
content: |
$("#get-number-format").click(() => tryCatch(getNumberFormat));
$("#get-currency").click(() => tryCatch(getCurrency));
$("#get-date").click(() => tryCatch(getDate));
$("#get-time").click(() => tryCatch(getTime));
@lumine2008
lumine2008 / Simulate Worksheet Custom Properties.EXCEL.yaml
Last active April 8, 2020 14:45
Registers event handlers that run when a worksheet is added, activated, or deactivated, or when the settings of a workbook are changed.
name: Simulate Worksheet Custom Properties
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: >
$("#add-property-on-active-sheet").click(() => tryCatch(addProperty));
@lumine2008
lumine2008 / CultureInfoDemo.EXCEL.yaml
Created August 8, 2019 03:15
Create a new snippet from a blank template.
name: CultureInfoDemo
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#name").click(() => tryCatch(name));
$("#useSystemSeparators").click(() => tryCatch(useSystemSeparators));
$("#decimalSeparator").click(() => tryCatch(decimalSeparator));
$("#thousandsSeparator").click(() => tryCatch(thousandsSeparator));
@lumine2008
lumine2008 / ReproTest - Large Range issue - oracle.EXCEL.yaml
Created August 22, 2019 02:03
Create a new snippet from a blank template.
name: ReproTest - Large Range issue - oracle
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |-
$("#run").click(() => tryCatch(run));
@lumine2008
lumine2008 / large number issue validation.EXCEL.yaml
Created August 22, 2019 07:10
Create a new snippet from a blank template.
name: large number issue validation
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) => {
@lumine2008
lumine2008 / Persist Settings.EXCEL.yaml
Created August 29, 2019 14:53
Creates, gets, changes, and deletes settings that are unique to the specific workbook and add-in combination.
name: Persist Settings
description: >-
Creates, gets, changes, and deletes settings that are unique to the specific
workbook and add-in combination.
host: EXCEL
api_set: {}
script:
content: |
$("#create-setting").click(() => tryCatch(createSetting));
$("#change-setting").click(() => tryCatch(changeSetting));
@lumine2008
lumine2008 / GithubIssue_context.sync hangs.EXCEL.yaml
Created August 30, 2019 13:41
Performs a basic Excel API call using TypeScript.
name: GithubIssue_context.sync hangs
description: Performs a basic Excel API call using TypeScript.
host: EXCEL
api_set: {}
script:
content: |+
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context: Excel.RequestContext) => {