This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Ex 4 Revisão ' | |
| 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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Ex 3 Revisão ' | |
| 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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Ex 2 Revisão ' | |
| 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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'EX1 Revisão ' | |
| description: Create a new snippet from a blank template. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| show.addEventListener("click", async () => { | |
| await Excel.run(async function(context) { | |
| let sheet = context.workbook.worksheets.getActiveWorksheet(); | |
| let table = sheet.tables.add("A1:B1", true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: EX2 Lista 3 | |
| description: EX2 Lista 3 | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| button.addEventListener("click", async () => { | |
| await Excel.run(async function(context) { | |
| let sheet = context.workbook.worksheets.getActiveWorksheet(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: EX1 Lista 3 | |
| description: EX1 Lista 3 | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: > | |
| const student = document.getElementById("Nome") as HTMLInputElement; | |
| const nota1 = document.getElementById("field") as HTMLInputElement; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: EX3 L2 | |
| description: Create a new snippet from a blank template. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| run.addEventListener("click", () => { | |
| Excel.run(function(context) { | |
| let sheet = context.workbook.worksheets.getActiveWorksheet(); | |
| sheet.getUsedRange().clear();; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: EX2 L2 | |
| description: Create a new snippet from a blank template. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| $("#mostrar").click(() => tryCatch(run)); | |
| async function run() { | |
| await Excel.run(async (context) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'EX1 L2 ' | |
| description: Create a new snippet from a blank template. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: "const Animal = [];\r\n\r\nsave.addEventListener(\"click\", () => {\r\n const Pet = {\r\n Nome: field1.value,\r\n Data: field2.valueAsDate,\r\n Especie: field3.value,\r\n Raca: field4.value,\r\n Sexo: field5.value\r\n };\r\n\r\n Animal.push(Pet);\r\n\r\n field1.value = \"\";\r\n field2.value = \"\";\r\n field3.value = \"\";\r\n field4.value = \"\";\r\n field5.value = \"\";\r\n});\r\n\r\nshow.addEventListener(\"click\", () => {\r\n Excel.run(function(context) {\r\n const sheet = context.workbook.worksheets.getActiveWorksheet();\r\n sheet.getUsedRange().clear();\r\n sheet.getRange(\"A1:E1\").values = [[\"Nome\", \"Nascimento\", \"Especie\", \"Raça\", \"Sexo\"]];\r\n for (let i = 2; i <= Animal.length + 1; i++) {\r\n const pet = Animal[i - 2];\r\n sheet.getRange(`A${i}:E${i}`).values = [[pet.Nome, pet.Data, pet.Especie, pet.Raca, pet.Sexo]];\r\n }\r\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Exercício 5 | |
| description: Create a new snippet from a blank template. | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: "but_Add.addEventListener(\"click\", bot_Add);\r\nbut_Med.addEventListener(\"click\", bot_Media);\r\n\r\nvar l_media = [];\r\n\r\nfunction bot_Add() {\r\n Word.run(function(context) {\r\n let docBody = context.document.body;\r\n let n1 = nun1.value;\r\n docBody.clear();\r\n if (isNaN(n1)) {\r\n docBody.insertParagraph(\"Apenas permitido números\", \"End\");\r\n } else {\r\n n1 = parseFloat(n1);\r\n l_media.push(n1);\r\n docBody.insertParagraph(\"Item adicionado com sucesso.\", \"End\");\r\n nun1.value = \"\";\r\n }\r\n return context.sync();\r\n });\r\n}\r\nfunction bot_Media() {\r\n Word.run(function(context) {\r\n let docBody = context.document.body;\r\n docBody.clear();\r\n if (l_media.length) {\r\n const soma = l_media.reduce((a, b) => a + b, 0);\r\n const med = soma / l_media.length || 0;\r\n docBody.insertParagraph(` |
NewerOlder