This file contains 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: money-add-row | |
description: Registers event handlers that run when a table is changed or selected. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: "$(\"#setup\").click(() => tryCatch(setup));\n$(\"#register-on-changed-handler\").click(() => tryCatch(registerOnChangedHandler));\n$(\"#change-data\").click(() => tryCatch(changeData));\n\nasync function registerOnChangedHandler() {\n await Excel.run(async (context) => {\n let table = context.workbook.tables.getItemAt(0);\n table.onChanged.add(onChange);\n\n await context.sync();\n console.log(\"A handler has been registered for the onChanged event\");\n });\n}\n\nasync function changeData() {\n await Excel.run(async (context) => {\n let sheet = context.workbook.worksheets.getItem(\"Sample\");\n let range = sheet.getRange(\"B2\");\n range.values = [[\"test\"]];\n range.format.autofitColumns();\n\n await context.sync();\n console.log(\"B2 value has been changed.\");\n });\n\n await Excel.run(async (context) => {\n let sheet = c |
This file contains 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: money-add-row | |
description: Registers event handlers that run when a table is changed or selected. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: "$(\"#setup\").click(() => tryCatch(setup));\n$(\"#register-on-changed-handler\").click(() => tryCatch(registerOnChangedHandler));\n$(\"#change-data\").click(() => tryCatch(changeData));\n\nasync function registerOnChangedHandler() {\n await Excel.run(async (context) => {\n let table = context.workbook.tables.getItemAt(0);\n table.onChanged.add(onChange);\n\n await context.sync();\n console.log(\"A handler has been registered for the onChanged event\");\n });\n}\n\nasync function changeData() {\n await Excel.run(async (context) => {\n let sheet = context.workbook.worksheets.getItem(\"Sample\");\n let range = sheet.getRange(\"B2\");\n range.values = [[\"test\"]];\n range.format.autofitColumns();\n\n await context.sync();\n console.log(\"B2 value has been changed.\");\n });\n\n await Excel.run(async (context) => {\n let sheet = c |
This file contains 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: Blank snippet | |
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 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: add-or-insert-timeout | |
description: Create a new snippet from a blank template. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#add").click(() => tryCatch(add)); | |
$("#insert").click(() => tryCatch(insert)); | |
async function add() { |
This file contains 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: Clear and untrack a range | |
description: Clear and untrack a range | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#setup").click(() => tryCatch(setup)); | |
$("#insert-range").click(() => tryCatch(insertRange)); | |
$("#delete-range").click(() => tryCatch(deleteRange)); |
This file contains 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: Clear and untrack a range | |
description: Clear and untrack a range | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#setup").click(() => tryCatch(setup)); | |
$("#insert-range").click(() => tryCatch(insertRange)); | |
$("#delete-range").click(() => tryCatch(deleteRange)); |
This file contains 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
$("#setup").click(() => tryCatch(setup)); | |
$("#insert-range").click(() => tryCatch(insertRange)); | |
$("#delete-range").click(() => tryCatch(deleteRange)); | |
$("#clear-range").click(() => tryCatch(clearRange)); | |
async function insertRange() { | |
await Excel.run(async (context) => { | |
const sheet = context.workbook.worksheets.getItem("Sample"); |
This file contains 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
$("#setup").click(() => tryCatch(setup)); | |
$("#insert-range").click(() => tryCatch(insertRange)); | |
$("#delete-range").click(() => tryCatch(deleteRange)); | |
$("#clear-range").click(() => tryCatch(clearRange)); | |
async function insertRange() { | |
await Excel.run(async (context) => { | |
const sheet = context.workbook.worksheets.getItem("Sample"); | |
const range = sheet.getRange("B4:E4"); |
This file contains 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
/// debug | |
const page1 = {"transactions":[{"id":"9ebee3e75062477e868aa263b2c2e861","description":"CD DEPOSIT .INITIAL.","is_pending":false,"order":"1586992384719.732","amount":"1000.00","provider_amount":"1000.00","currency":"USD","classification":0,"merchant_name":"Cd Deposit Initial","provider_merchant_name":"Cd Deposit Initial","merchant_name_and_location":"","category_id":"1ce8af1d77aa4c7eaf8ccb1b9eadbf76","provider_category":"Transfer","provider_category_id":"1ce8af1d77aa4c7eaf8ccb1b9eadbf76","category":"Transfer","category__icon_url":"https://spendstatichosting.blob.core.windows.net/icons/icon-categories-default-new@3x.png","auto_categorized":false,"purchase_type":"special","transaction_date":"2020-04-14T00:00:00","provider_transaction_date":"2020-04-14T00:00:00","is_deleted":false,"posting_date":"2020-04-15T23:13:04.719779","created":"2020-04-15T23:13:04.723897","modified":"2020-04-15T23:13:04.723938","get_classification_display":"Unclassified","transaction_id":"dde8edf22aba478e9d98b9d522137b68" |
This file contains 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
import SwiftyDropbox | |
import Foundation | |
extension CallError { | |
var errorCode: Int? { | |
switch self { | |
case .InternalServerError(let code, let message): | |
return code | |
case .HTTPError(let code, let message): | |
return code |
NewerOlder