Skip to content

Instantly share code, notes, and snippets.

@ErickPetru
Last active November 4, 2021 16:02
Show Gist options
  • Save ErickPetru/df84e2ffd08fa9d759263c2e3bf06b4f to your computer and use it in GitHub Desktop.
Save ErickPetru/df84e2ffd08fa9d759263c2e3bf06b4f to your computer and use it in GitHub Desktop.
name: Lista de Exercícios 2 - Item 2
description: ''
host: EXCEL
api_set: {}
script:
content: "const field = document.getElementById(\"field\") as HTMLInputElement;\r\nconst button = document.getElementById(\"button\") as HTMLButtonElement;\r\n\r\nbutton.addEventListener(\"click\", () => {\r\n Excel.run(async (context) => {\r\n context.workbook.getSelectedRange().format.fill.color = field.value;\r\n });\r\n});\r\n"
language: typescript
template:
content: "<input id=\"field\" type=\"color\">\r\n<button id=\"button\">Colorir Células Selecionadas</button>"
language: html
style:
content: ''
language: css
libraries: |-
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
@types/office-js
[email protected]/client/core.min.js
@types/core-js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment