├── .DS_Store ├── .babelrc ├── .eslintrc.json ├── .gitignore ├── .npmrc ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── __tests__ ├── App.test.tsx ├── IDE.test.tsx ├── Query.test.tsx ├── QueryTable.test.tsx └── Querybox.test.tsx ├── assets ├── boost-banner.png ├── boost-icon-128.png ├── boost-icon-16.png ├── boost-icon-32.png └── boost-icon-80.png ├── config └── CSSStub.js ├── docs ├── excelFunction.js.html ├── fonts │ ├── OpenSans-Bold-webfont.eot │ ├── OpenSans-Bold-webfont.svg │ ├── OpenSans-Bold-webfont.woff │ ├── OpenSans-BoldItalic-webfont.eot │ ├── OpenSans-BoldItalic-webfont.svg │ ├── OpenSans-BoldItalic-webfont.woff │ ├── OpenSans-Italic-webfont.eot │ ├── OpenSans-Italic-webfont.svg │ ├── OpenSans-Italic-webfont.woff │ ├── OpenSans-Light-webfont.eot │ ├── OpenSans-Light-webfont.svg │ ├── OpenSans-Light-webfont.woff │ ├── OpenSans-LightItalic-webfont.eot │ ├── OpenSans-LightItalic-webfont.svg │ ├── OpenSans-LightItalic-webfont.woff │ ├── OpenSans-Regular-webfont.eot │ ├── OpenSans-Regular-webfont.svg │ └── OpenSans-Regular-webfont.woff ├── global.html ├── index.html ├── scripts │ ├── linenumber.js │ └── prettify │ │ ├── lang-css.js │ │ └── prettify.js └── styles │ ├── jsdoc-default.css │ ├── prettify-jsdoc.css │ └── prettify-tomorrow.css ├── jest.config.js ├── jsdoc.json ├── manifest.xml ├── package-lock.json ├── package.json ├── references ├── allWorkBook Object pix.png ├── ast-WHERE-multiple.png ├── ast-WHERE.png ├── ast.png ├── queryHeaders.png └── togglecheckboxFunction.png ├── src ├── commands │ ├── commands.html │ └── commands.ts ├── excelFunction.ts ├── functions │ ├── functions.html │ └── functions.ts ├── taskpane │ ├── components │ │ ├── App.tsx │ │ ├── Contexts.tsx │ │ ├── IDE.tsx │ │ ├── NavBar.tsx │ │ ├── Query.tsx │ │ ├── ide │ │ │ ├── FuncInput.tsx │ │ │ └── FuncLibrary.tsx │ │ └── query │ │ │ ├── QueryTable.tsx │ │ │ ├── Querybox.tsx │ │ │ └── queryFunctions │ │ │ ├── handleQuery.ts │ │ │ ├── reloadSheets.ts │ │ │ ├── selectParser.ts │ │ │ └── whereFilter.ts │ ├── index.tsx │ ├── taskpane.css │ └── taskpane.html └── types.ts ├── tsconfig.json └── webpack.config.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/.DS_Store -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env", "@babel/preset-typescript", "@babel/preset-react"] 3 | } -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "office-addins" 4 | ], 5 | "extends": [ 6 | "plugin:office-addins/recommended" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | .DS_Store -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | registry=https://registry.npmjs.org/ -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | 5 | // List of extensions which should be recommended for users of this workspace. 6 | "recommendations": [ 7 | "ms-edgedevtools.vscode-edge-devtools", 8 | "msoffice.microsoft-office-add-in-debugger", 9 | "dbaeumer.vscode-eslint", 10 | "esbenp.prettier-vscode" 11 | ], 12 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace. 13 | "unwantedRecommendations": [] 14 | } 15 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Excel Desktop (Custom Functions)", 9 | "type": "node", 10 | "request": "attach", 11 | "port": 9229, 12 | "protocol": "inspector", 13 | "timeout": 600000, 14 | "preLaunchTask": "Debug: Excel Desktop", 15 | "postDebugTask": "Stop Debug" 16 | }, 17 | { 18 | "name": "Excel Desktop (Edge Chromium)", 19 | "type": "pwa-msedge", 20 | "request": "attach", 21 | "useWebView": true, 22 | "port": 9229, 23 | "timeout": 600000, 24 | "webRoot": "${workspaceRoot}", 25 | "preLaunchTask": "Debug: Excel Desktop", 26 | "postDebugTask": "Stop Debug" 27 | }, 28 | { 29 | "name": "Excel Desktop (Edge Legacy)", 30 | "type": "office-addin", 31 | "request": "attach", 32 | "url": "https://localhost:3000/taskpane.html?_host_Info=Excel$Win32$16.01$en-US$$$$0", 33 | "port": 9222, 34 | "timeout": 600000, 35 | "webRoot": "${workspaceRoot}", 36 | "preLaunchTask": "Debug: Excel Desktop", 37 | "postDebugTask": "Stop Debug" 38 | }, 39 | { 40 | "name": "Office Online (Chrome)", 41 | "type": "chrome", 42 | "request": "launch", 43 | // To debug your Add-in: 44 | // 1. When prompted, enter the url (share link) to an Office Online document. 45 | // 2. Sideload your Add-in. https://docs.microsoft.com/en-us/office/dev/add-ins/testing/sideload-office-add-ins-for-testing 46 | "url": "${input:officeOnlineDocumentUrl}", 47 | "webRoot": "${workspaceFolder}", 48 | "preLaunchTask": "Debug: Web" 49 | }, 50 | { 51 | "name": "Office Online (Edge Chromium)", 52 | "type": "pwa-msedge", 53 | "request": "launch", 54 | "port": 9222, 55 | // To debug your Add-in: 56 | // 1. When prompted, enter the url (share link) to an Office Online document. 57 | // 2. Sideload your Add-in. https://docs.microsoft.com/en-us/office/dev/add-ins/testing/sideload-office-add-ins-for-testing 58 | "url": "${input:officeOnlineDocumentUrl}", 59 | "webRoot": "${workspaceFolder}", 60 | "preLaunchTask": "Debug: Web" 61 | } 62 | ], 63 | "inputs": [ 64 | { 65 | "id": "officeOnlineDocumentUrl", 66 | "type": "promptString", 67 | "description": "Please enter the url for the Office Online document." 68 | } 69 | ] 70 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.validate": [ 3 | "javascript", 4 | "javascriptreact", 5 | "typescript" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Build (Development)", 8 | "type": "npm", 9 | "script": "build:dev", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | }, 14 | "presentation": { 15 | "clear": true, 16 | "panel": "shared", 17 | "showReuseMessage": false 18 | } 19 | }, 20 | { 21 | "label": "Build (Production)", 22 | "type": "npm", 23 | "script": "build", 24 | "group": "build", 25 | "presentation": { 26 | "clear": true, 27 | "panel": "shared", 28 | "showReuseMessage": false 29 | } 30 | }, 31 | { 32 | "label": "Debug: Excel Desktop", 33 | "type": "npm", 34 | "script": "start:desktop -- --app excel", 35 | "presentation": { 36 | "clear": true, 37 | "panel": "dedicated", 38 | }, 39 | "problemMatcher": [] 40 | }, 41 | { 42 | "label": "Debug: Web", 43 | "type": "npm", 44 | "script": "start:web", 45 | "presentation": { 46 | "clear": true, 47 | "panel": "shared", 48 | "showReuseMessage": false 49 | }, 50 | "problemMatcher": [] 51 | }, 52 | { 53 | "label": "Dev Server", 54 | "type": "npm", 55 | "script": "dev-server", 56 | "presentation": { 57 | "clear": true, 58 | "panel": "dedicated" 59 | }, 60 | "problemMatcher": [], 61 | "runOptions": { 62 | "runOn": "folderOpen" 63 | } 64 | }, 65 | { 66 | "label": "Install", 67 | "type": "npm", 68 | "script": "install", 69 | "presentation": { 70 | "clear": true, 71 | "panel": "shared", 72 | "showReuseMessage": false 73 | }, 74 | "problemMatcher": [] 75 | }, 76 | { 77 | "label": "Lint: Check for problems", 78 | "type": "npm", 79 | "script": "lint", 80 | "problemMatcher": [ 81 | "$eslint-stylish" 82 | ] 83 | }, 84 | { 85 | "label": "Lint: Fix all auto-fixable problems", 86 | "type": "npm", 87 | "script": "lint:fix", 88 | "problemMatcher": [ 89 | "$eslint-stylish" 90 | ] 91 | }, 92 | { 93 | "label": "Stop Debug", 94 | "type": "npm", 95 | "script": "stop", 96 | "presentation": { 97 | "clear": true, 98 | "panel": "shared", 99 | "showReuseMessage": false 100 | }, 101 | "problemMatcher": [] 102 | }, 103 | { 104 | "label": "Watch", 105 | "type": "npm", 106 | "script": "watch", 107 | "presentation": { 108 | "clear": true, 109 | "panel": "dedicated" 110 | }, 111 | "problemMatcher": [] 112 | }, 113 | ] 114 | } 115 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribute to this code sample 2 | 3 | Thank you for your interest in this sample! Your contributions and improvements will help the developer community. 4 | 5 | ## Ways to contribute 6 | 7 | There are several ways you can contribute to this sample: providing better code comments, fixing open issues, and adding new features. 8 | 9 | ### Provide better code comments 10 | 11 | Code comments make code samples even better by helping developers learn to use the code correctly in their own applications. If you spot a class, method, or section of code that you think could use better descriptions, then create a pull request with your code comments. 12 | 13 | 14 | In general, we want our code comments to follow these guidelines: 15 | 16 | - Any code that has associated documentation displayed in an IDE (such as IntelliSense, or JavaDocs) has code comments. 17 | - Classes, methods, parameters, and return values have clear descriptions. 18 | - Exceptions and errors are documented. 19 | - Remarks exist for anything special or notable about the code. 20 | - Sections of code that have complex algorithms have appropriate comments describing what they do. 21 | - Code added from Stack Overflow, or any other source, is clearly attributed. 22 | 23 | ### Fix open issues 24 | 25 | Sometimes we get a lot of issues, and it can be hard to keep up. If you have a solution to an open issue that hasn't been addressed, fix the issue and then submit a pull request. 26 | 27 | ### Add a new feature 28 | 29 | New features are great! Be sure to check with the repository admin first to be sure the feature fits the intent of the sample. Start by opening an issue in the repository that proposes and describes the feature. The repository admin will respond and may ask for more information. If the admin agrees to the new feature, create the feature and submit a pull request. 30 | 31 | ## Contribution guidelines 32 | 33 | We have some guidelines to help maintain a healthy repo and code for everyone. 34 | 35 | ### The Contribution License Agreement 36 | 37 | For most contributions, we ask you to sign a Contribution License Agreement (CLA). This will happen when you submit a pull request. Microsoft will send a link to the CLA to sign via email. Once you sign the CLA, your pull request can proceed. Read the CLA carefully, because you may need to have your employer sign it. 38 | 39 | ### Code contribution checklist 40 | 41 | Be sure to satisfy all of the requirements in the following list before submitting a pull request: 42 | 43 | - Follow the code style that is appropriate for the platform and language in this repo. For example, Android code follows the style conventions found in the [Code Style for Contributors guide](https://source.android.com/source/code-style.html). 44 | - Test your code. 45 | - Test the UI thoroughly to be sure your change hasn't broken anything. 46 | - Keep the size of your code change reasonable. If the repository owner cannot review your code change in 4 hours or less, your pull request may not be reviewed and approved quickly. 47 | - Avoid unnecessary changes. The reviewer will check differences between your code and the original code. Whitespace changes are called out along with your code. Be sure your changes will help improve the content. 48 | 49 | ### Submit a pull request to the master branch 50 | 51 | When you're finished with your work and are ready to have it merged into the master repository, follow these steps. Note: pull requests are typically reviewed within 10 business days. If your pull request is accepted you will be credited for your submission. 52 | 53 | 1. Submit your pull request against the master branch. 54 | 2. Sign the CLA, if you haven't already done so. 55 | 3. One of the repo admins will process your pull request, including performing a code review. If there are questions, discussions, or change requests in the pull request, be sure to respond. 56 | 4. When the repo admins are satisfied, they will accept and merge the pull request. 57 | 58 | Congratulations, you have successfully contributed to the sample! 59 | 60 | ## FAQ 61 | 62 | ### Where do I get a Contributor's License Agreement? 63 | 64 | If your pull request requires one, you'll automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA). 65 | 66 | As a community member, you must sign the CLA before you can contribute large submissions to this project. You only need complete and submit the CLA document once. Carefully review the document. You may be required to have your employer sign the document. 67 | 68 | ### What happens with my contributions? 69 | 70 | When you submit your changes via a pull request, our team will be notified and will review your pull request. You'll receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues. 71 | 72 | ### Who approves pull requests? 73 | 74 | The admin of the repository approves pull requests. 75 | 76 | ### How soon will I get a response about my change request or issue? 77 | 78 | We typically review pull requests and respond to issues within 10 business days. 79 | 80 | ## More resources 81 | 82 | - To learn more about Markdown, see [Daring Fireball](http://daringfireball.net/). 83 | - To learn more about using Git and GitHub, check out the [GitHub Help section](http://help.github.com/). 84 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Excel Custom Functions 2 | 3 | MIT License 4 | 5 | Copyright (c) Microsoft Corporation. All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](/assets/boost-banner.png) 2 | 5 | 6 |

7 | 8 | 9 | 10 | 11 |

12 | 13 |

Microsoft Excel Add-in for Developers

14 | 15 | ## About Us 16 | Boost is a Microsoft Excel Add-in to help developers import large excel workbooks into their database using SQL queries. Microsoft Excel has more than 30 million users and is the most popular spreadsheet application on the market. It is one of Microsoft’s core products since Excel’s release in 1985 and it has a new user every five minutes. 17 | 18 | check out our website [www.boost-excel.com](http://boost-excel.s3-website-us-east-1.amazonaws.com) 19 | 20 | ## Features 21 | 22 | 📝 **Reading and writing from multiple sheets to query table** 23 | 24 | 💪 **Ability to write and use custom functions directly in Excel with TypeScript** 25 | 26 | *** 27 |
28 | 29 | ## Getting Started 30 | 31 | ### Installation 32 | 33 | **Prerequisite**: Install Microsoft Excel Desktop version 16 and up. 34 | 35 | 1. Fork and clone this repository. 36 | 2. ```npm install``` 37 | 3. ```npm start``` 38 | 39 | ### Technologies 40 | [Excel](https://www.microsoft.com/en-us/microsoft-365/excel) | [Excel JS API](https://docs.microsoft.com/en-us/office/dev/add-ins/reference/overview/excel-add-ins-reference-overview) | [React](https://reactjs.org/) | [React Hooks](https://reactjs.org/docs/hooks-intro.html) | [Typescript](https://www.typescriptlang.org/) | [SQL](https://www.postgresql.org/) | [CodeMirror](https://codemirror.net/) | [Jest](https://jestjs.io/) 41 | 42 | *** 43 |
44 | 45 | ## How it works 46 | 47 | ### How to open 48 | 1. Go to the ribbon **INSERT**, **Add-Ins**. Click on Boost and head back to **HOME** to open. 49 | 50 | 51 | ### Querying 52 | 2. Click on the **Query** tab in the add-in to utilize the querying feature. Query across multiple worksheets in your Excel application. 53 | 54 | 55 | ### Custom Function Creations 56 | 3. Click on the **IDE** tab to create and save customized TypeScript functions. 57 | 58 | 59 | *** 60 |
61 | 62 | ## The Boost Team 63 |
64 | 65 | > Charles Ren [@codeWithRen](https://github.com/codeWithRen)
66 | > Chloe Courtois [@chloecourt](https://github.com/chloecourt)
67 | > Janson Xavier [@JansonXavier](https://github.com/JansonXavier)
68 | > Sophia Sam [@sophiasam96](https://github.com/sophiasam96)
69 | 70 |
71 | 72 | *** 73 | 74 | ## If You Want To Contribute! 75 | 76 | If you found this interesting or helpful at all, feel free to drop a :star: [![GitHub stars](https://img.shields.io/github/stars/oslabs-beta/Boost?style=social&label=Star&)](https://github.com/oslabs-beta/Boost/stargazers) :star: on this project to show your support! 77 | 78 | All bugs, tasks or enhancements are tracked as GitHub issues. 79 | 80 | The following is a list of features + improvements for future open-source developers that the Boost team has either started or would like to see implemented. If you have additional new ideas, feel free to implement those as well! Much appreciated. 81 | 82 | Query: 83 | - Implementing **JOIN** clause for Querying 84 | - Handling invalid/duplicate names in Query input 85 | - Row management in the Query table 86 | 87 | Custom Functions 88 | - Reading and writing from the text editor to functions.ts file 89 | - Creating custom functions in Typescript 90 | 91 | Other: 92 | - React Hooks testing 93 | - Containerization with Docker 94 | - 95 | ### Contributors 96 | >Kevin Co - Logo Designer [@itskevinco](https://www.instagram.com/itskevinco/)
97 | 98 | ## License 99 | This project is available under the MIT License. 100 | -------------------------------------------------------------------------------- /__tests__/App.test.tsx: -------------------------------------------------------------------------------- 1 | /* global describe it*/ 2 | import App from "../src/taskpane/components/App"; 3 | import React from "react"; 4 | import { render, fireEvent } from "@testing-library/react"; 5 | // import { build, fake } from "test-data-bot"; 6 | import "@testing-library/jest-dom/extend-expect"; 7 | 8 | describe("App.tsx has mounted", () => { 9 | it("App render", () => { 10 | const {} = render(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/IDE.test.tsx: -------------------------------------------------------------------------------- 1 | /* global describe it*/ 2 | import IDE from "../src/taskpane/components/IDE"; 3 | import React from "react"; 4 | import { render, fireEvent } from "@testing-library/react"; 5 | // import { build, fake } from "test-data-bot"; 6 | import "@testing-library/jest-dom/extend-expect"; 7 | 8 | describe("IDE.tsx has mounted", () => { 9 | it("render", () => { 10 | const {} = render(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/Query.test.tsx: -------------------------------------------------------------------------------- 1 | /* global describe it*/ 2 | import Query from "../src/taskpane/components/Query"; 3 | import React from "react"; 4 | import { render, fireEvent } from "@testing-library/react"; 5 | // import { build, fake } from "test-data-bot"; 6 | import "@testing-library/jest-dom/extend-expect"; 7 | 8 | describe("Query.tsx has mounted", () => { 9 | it("render", () => { 10 | const {} = render(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/QueryTable.test.tsx: -------------------------------------------------------------------------------- 1 | /* global describe it*/ 2 | import QueryTable from "../src/taskpane/components/query/QueryTable"; 3 | import React from "react"; 4 | import { render, fireEvent } from "@testing-library/react"; 5 | // import { build, fake } from "test-data-bot"; 6 | import "@testing-library/jest-dom/extend-expect"; 7 | 8 | describe("QueryTable did mount", () => { 9 | it("renders", () => { 10 | const {} = render(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/Querybox.test.tsx: -------------------------------------------------------------------------------- 1 | /* global describe it*/ 2 | import Querybox from "../src/taskpane/components/query/Querybox"; 3 | import React from "react"; 4 | import { render, fireEvent } from "@testing-library/react"; 5 | // import { build, fake } from "test-data-bot"; 6 | import "@testing-library/jest-dom/extend-expect"; 7 | 8 | // describe("Querybox.tsx mounts", () => { 9 | // it("component did mount", () => { 10 | // const div = document.createElement("div"); 11 | // ReactDOM.render( 12 | // { 14 | // return null; 15 | // }} 16 | // />, 17 | // div 18 | // ); 19 | // }); 20 | // }); 21 | 22 | describe("Querybox.tsx mounts", () => { 23 | it("component renders", () => { 24 | const {} = render( 25 | { 27 | return null; 28 | }} 29 | /> 30 | ); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /assets/boost-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/assets/boost-banner.png -------------------------------------------------------------------------------- /assets/boost-icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/assets/boost-icon-128.png -------------------------------------------------------------------------------- /assets/boost-icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/assets/boost-icon-16.png -------------------------------------------------------------------------------- /assets/boost-icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/assets/boost-icon-32.png -------------------------------------------------------------------------------- /assets/boost-icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/assets/boost-icon-80.png -------------------------------------------------------------------------------- /config/CSSStub.js: -------------------------------------------------------------------------------- 1 | /* global module */ 2 | module.exports = {}; 3 | -------------------------------------------------------------------------------- /docs/excelFunction.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Source: excelFunction.js 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |

Source: excelFunction.js

21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
/**
30 |  * Get the active worksheet
31 |  * @param {object} -
32 |  * @return {object}
33 |  */
34 | export const getSheet = (context) => {
35 |   return context.workbook.worksheets.getActiveWorksheet();
36 | };
37 | 
38 | /**
39 |  *
40 |  */
41 | export const funcName = async (context) => {
42 |   await Excel.run(async (context) => {
43 |     let sheet = excelFuncs.getSheet(context);
44 |     sheet.load("name"); // getname of the active worksheet
45 | 
46 |     // sheet.getUsedRange().load() gives us the cells that are being used
47 |     // const load = sheet.getUsedRange().getRow(2);
48 |     const range = sheet.getUsedRange();
49 |     range.load("address");
50 |     range.load("values");
51 | 
52 |     // used to navigate you to the select range
53 |     range.select();
54 | 
55 |     await context.sync();
56 |     // console.log("test:", load);
57 |     // console.log("test2:", range);
58 |     // console.log(`The active worksheet is "${sheet.name}"`);
59 |   });
60 | };
61 | 
62 | 
63 | 
64 |
65 |
66 | 67 | 68 | 69 | 70 |
71 | 72 | 75 | 76 |
77 | 78 |
79 | Documentation generated by JSDoc 3.6.10 on Wed Mar 23 2022 16:53:02 GMT-0400 (Eastern Daylight Time) 80 |
81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/docs/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/global.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Global 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |

Global

21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 |
30 | 31 |

32 | 33 | 34 |
35 | 36 |
37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
78 | 79 | 80 | 81 | 82 |
83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |

Members

98 | 99 | 100 | 101 |

(constant) funcName

102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 |
Source:
140 |
143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 |
151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 |

(constant) getSheet

160 | 161 | 162 | 163 | 164 |
165 |

Get the active worksheet

166 |
167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 |
175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 |
Source:
202 |
205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 |
213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 |
228 | 229 |
230 | 231 | 232 | 233 | 234 |
235 | 236 | 239 | 240 |
241 | 242 |
243 | Documentation generated by JSDoc 3.6.10 on Wed Mar 23 2022 16:53:02 GMT-0400 (Eastern Daylight Time) 244 |
245 | 246 | 247 | 248 | 249 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Home 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |

Home

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |

30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 55 | 56 |
57 | 58 |
59 | Documentation generated by JSDoc 3.6.10 on Wed Mar 23 2022 16:53:02 GMT-0400 (Eastern Daylight Time) 60 |
61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /docs/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (() => { 3 | const source = document.getElementsByClassName('prettyprint source linenums'); 4 | let i = 0; 5 | let lineNumber = 0; 6 | let lineId; 7 | let lines; 8 | let totalLines; 9 | let anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = `line${lineNumber}`; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/scripts/prettify/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p th:last-child { border-right: 1px solid #ddd; } 224 | 225 | .ancestors, .attribs { color: #999; } 226 | .ancestors a, .attribs a 227 | { 228 | color: #999 !important; 229 | text-decoration: none; 230 | } 231 | 232 | .clear 233 | { 234 | clear: both; 235 | } 236 | 237 | .important 238 | { 239 | font-weight: bold; 240 | color: #950B02; 241 | } 242 | 243 | .yes-def { 244 | text-indent: -1000px; 245 | } 246 | 247 | .type-signature { 248 | color: #aaa; 249 | } 250 | 251 | .name, .signature { 252 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 253 | } 254 | 255 | .details { margin-top: 14px; border-left: 2px solid #DDD; } 256 | .details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } 257 | .details dd { margin-left: 70px; } 258 | .details ul { margin: 0; } 259 | .details ul { list-style-type: none; } 260 | .details li { margin-left: 30px; padding-top: 6px; } 261 | .details pre.prettyprint { margin: 0 } 262 | .details .object-value { padding-top: 0; } 263 | 264 | .description { 265 | margin-bottom: 1em; 266 | margin-top: 1em; 267 | } 268 | 269 | .code-caption 270 | { 271 | font-style: italic; 272 | font-size: 107%; 273 | margin: 0; 274 | } 275 | 276 | .source 277 | { 278 | border: 1px solid #ddd; 279 | width: 80%; 280 | overflow: auto; 281 | } 282 | 283 | .prettyprint.source { 284 | width: inherit; 285 | } 286 | 287 | .source code 288 | { 289 | font-size: 100%; 290 | line-height: 18px; 291 | display: block; 292 | padding: 4px 12px; 293 | margin: 0; 294 | background-color: #fff; 295 | color: #4D4E53; 296 | } 297 | 298 | .prettyprint code span.line 299 | { 300 | display: inline-block; 301 | } 302 | 303 | .prettyprint.linenums 304 | { 305 | padding-left: 70px; 306 | -webkit-user-select: none; 307 | -moz-user-select: none; 308 | -ms-user-select: none; 309 | user-select: none; 310 | } 311 | 312 | .prettyprint.linenums ol 313 | { 314 | padding-left: 0; 315 | } 316 | 317 | .prettyprint.linenums li 318 | { 319 | border-left: 3px #ddd solid; 320 | } 321 | 322 | .prettyprint.linenums li.selected, 323 | .prettyprint.linenums li.selected * 324 | { 325 | background-color: lightyellow; 326 | } 327 | 328 | .prettyprint.linenums li * 329 | { 330 | -webkit-user-select: text; 331 | -moz-user-select: text; 332 | -ms-user-select: text; 333 | user-select: text; 334 | } 335 | 336 | .params .name, .props .name, .name code { 337 | color: #4D4E53; 338 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 339 | font-size: 100%; 340 | } 341 | 342 | .params td.description > p:first-child, 343 | .props td.description > p:first-child 344 | { 345 | margin-top: 0; 346 | padding-top: 0; 347 | } 348 | 349 | .params td.description > p:last-child, 350 | .props td.description > p:last-child 351 | { 352 | margin-bottom: 0; 353 | padding-bottom: 0; 354 | } 355 | 356 | .disabled { 357 | color: #454545; 358 | } 359 | -------------------------------------------------------------------------------- /docs/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: #006400; 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #718c00; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #8959a8; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #8e908c; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #4271ae; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #f5871f; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #4d4d4c; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #4d4d4c; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #4d4d4c; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /* global module */ 2 | module.exports = { 3 | preset: "ts-jest/presets/default-esm", 4 | testEnvironment: "jsdom", 5 | globals: { 6 | "ts-jest": { 7 | useESM: true, 8 | }, 9 | moduleNameMapper: { 10 | "^(\\.{1,2}/.*)\\.js$": "$1", 11 | "^.+\\.(css|less)$": "/config/CSSStub.js", 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /jsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": { 3 | "include": ["src"], 4 | "includePattern": ".js$", 5 | "excludePattern": "(node_modules/|docs)" 6 | }, 7 | "plugins": ["plugins/markdown"], 8 | "templates": { 9 | "cleverLinks": true, 10 | "monospacelinks": true 11 | }, 12 | "opts": { 13 | "recurse": true, 14 | "destination": "./docs/" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 35e8fe18-68ea-463c-b138-52cbce24d0f8 4 | 1.0.0.0 5 | Contoso 6 | en-US 7 | 8 | 9 | 10 | 11 | 12 | 13 | https://www.contoso.com 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ReadWriteDocument 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | <Description resid="GetStarted.Description"/> 48 | <LearnMoreUrl resid="GetStarted.LearnMoreUrl"/> 49 | </GetStarted> 50 | <FunctionFile resid="Commands.Url"/> 51 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 52 | <OfficeTab id="TabHome"> 53 | <Group id="CommandsGroup"> 54 | <Label resid="CommandsGroup.Label"/> 55 | <Icon> 56 | <bt:Image size="16" resid="Icon.16x16"/> 57 | <bt:Image size="32" resid="Icon.32x32"/> 58 | <bt:Image size="80" resid="Icon.80x80"/> 59 | </Icon> 60 | <Control xsi:type="Button" id="TaskpaneButton"> 61 | <Label resid="TaskpaneButton.Label"/> 62 | <Supertip> 63 | <Title resid="TaskpaneButton.Label"/> 64 | <Description resid="TaskpaneButton.Tooltip"/> 65 | </Supertip> 66 | <Icon> 67 | <bt:Image size="16" resid="Icon.16x16"/> 68 | <bt:Image size="32" resid="Icon.32x32"/> 69 | <bt:Image size="80" resid="Icon.80x80"/> 70 | </Icon> 71 | <Action xsi:type="ShowTaskpane"> 72 | <TaskpaneId>ButtonId1</TaskpaneId> 73 | <SourceLocation resid="Taskpane.Url"/> 74 | </Action> 75 | </Control> 76 | </Group> 77 | </OfficeTab> 78 | </ExtensionPoint> 79 | </DesktopFormFactor> 80 | </Host> 81 | </Hosts> 82 | <Resources> 83 | <bt:Images> 84 | <bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/boost-icon-16.png"/> 85 | <bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/boost-icon-32.png"/> 86 | <bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/boost-icon-80.png"/> 87 | </bt:Images> 88 | <bt:Urls> 89 | <bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/dist/functions.js"/> 90 | <bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/dist/functions.json"/> 91 | <bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3000/dist/functions.html"/> 92 | <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/> 93 | <bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/> 94 | <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/> 95 | </bt:Urls> 96 | <bt:ShortStrings> 97 | <bt:String id="Functions.Namespace" DefaultValue="CONTOSO"/> 98 | <bt:String id="GetStarted.Title" DefaultValue="Get started with Boost"/> 99 | <bt:String id="CommandsGroup.Label" DefaultValue="Commands Group"/> 100 | <bt:String id="TaskpaneButton.Label" DefaultValue="Boost"/> 101 | </bt:ShortStrings> 102 | <bt:LongStrings> 103 | <bt:String id="GetStarted.Description" DefaultValue="Boost loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started."/> 104 | <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show Boost"/> 105 | </bt:LongStrings> 106 | </Resources> 107 | </VersionOverrides> 108 | </OfficeApp> -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "excel-custom-functions", 3 | "version": "2.0.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/OfficeDev/Excel-Custom-Functions.git" 7 | }, 8 | "license": "MIT", 9 | "engines": { 10 | "node": ">=14 <17", 11 | "npm": ">=6 <9" 12 | }, 13 | "scripts": { 14 | "test": "jest", 15 | "build": "webpack --mode production", 16 | "build:dev": "webpack --mode development", 17 | "dev-server": "webpack serve --mode development", 18 | "doc": "jsdoc -c jsdoc.json", 19 | "lint": "office-addin-lint check", 20 | "lint:fix": "office-addin-lint fix", 21 | "prettier": "office-addin-lint prettier", 22 | "start": "npm run build & office-addin-debugging start manifest.xml", 23 | "start:desktop": "office-addin-debugging start manifest.xml desktop", 24 | "start:web": "office-addin-debugging start manifest.xml web", 25 | "stop": "office-addin-debugging stop manifest.xml", 26 | "test:e2e": "mocha -r ts-node/register test/end-to-end/*.ts", 27 | "test:unit": "mocha -r ts-node/register test/unit/*.test.ts", 28 | "validate": "office-addin-manifest validate manifest.xml", 29 | "watch": "webpack --mode development --watch" 30 | }, 31 | "dependencies": { 32 | "@babel/core": "^7.13.16", 33 | "@babel/preset-env": "^7.16.11", 34 | "@babel/preset-react": "^7.16.7", 35 | "@babel/preset-typescript": "^7.13.0", 36 | "@codemirror/lint": "^0.19.6", 37 | "@fluentui/react": "^8.34.0", 38 | "@testing-library/dom": "^8.13.0", 39 | "@testing-library/jest-dom": "^5.16.4", 40 | "@testing-library/react": "^12.1.4", 41 | "@testing-library/react-hooks": "^7.0.2", 42 | "@types/codemirror": "^5.60.5", 43 | "@types/custom-functions-runtime": "^1.6.0", 44 | "@types/jest": "^27.4.1", 45 | "@types/office-js": "^1.0.180", 46 | "@types/office-runtime": "^1.0.17", 47 | "@types/react": "^16.14.24", 48 | "@types/react-dom": "^16.8.4", 49 | "@types/react-hot-loader": "^4.1.0", 50 | "@types/react-table": "^7.7.10", 51 | "@types/webpack": "^4.4.34", 52 | "@types/webpack-dev-server": "^4.1.0", 53 | "codemirror": "^5.65.2", 54 | "core-js": "^3.9.1", 55 | "css-loader": "^6.7.1", 56 | "es6-promise": "^4.2.8", 57 | "node-sql-parser": "^4.3.0", 58 | "pg": "^8.7.3", 59 | "react": "^16.8.2", 60 | "react-codemirror2": "^7.2.1", 61 | "react-dom": "^16.8.2", 62 | "react-hot-loader": "^4.13.0", 63 | "react-table": "^7.7.0", 64 | "regenerator-runtime": "^0.13.7", 65 | "style-loader": "^3.3.1" 66 | }, 67 | "devDependencies": { 68 | "acorn": "^8.5.0", 69 | "babel-loader": "^8.2.2", 70 | "copy-webpack-plugin": "^9.0.1", 71 | "custom-functions-metadata-plugin": "^1.2.5", 72 | "eslint": "^7.20.0", 73 | "eslint-plugin-office-addins": "^2.0.0", 74 | "eslint-plugin-react": "^7.16.0", 75 | "file-loader": "^6.2.0", 76 | "html-loader": "^2.1.2", 77 | "html-webpack-plugin": "^5.3.2", 78 | "jest": "^27.5.1", 79 | "jsdoc": "^3.6.10", 80 | "less": "^3.9.0", 81 | "less-loader": "^10.0.1", 82 | "office-addin-cli": "^1.3.5", 83 | "office-addin-debugging": "^4.3.8", 84 | "office-addin-dev-certs": "^1.7.7", 85 | "office-addin-lint": "^2.0.0", 86 | "office-addin-manifest": "^1.7.7", 87 | "office-addin-prettier-config": "^1.1.4", 88 | "os-browserify": "^0.3.0", 89 | "process": "^0.11.10", 90 | "request": "^2.88.2", 91 | "source-map-loader": "^3.0.0", 92 | "test-data-bot": "^0.8.0", 93 | "ts-jest": "^27.1.4", 94 | "ts-loader": "^9.2.5", 95 | "typescript": "^4.3.5", 96 | "webpack": "^5.50.0", 97 | "webpack-cli": "^4.8.0", 98 | "webpack-dev-server": "4.7.3" 99 | }, 100 | "prettier": "office-addin-prettier-config", 101 | "browserslist": [ 102 | "ie 11" 103 | ] 104 | } 105 | -------------------------------------------------------------------------------- /references/allWorkBook Object pix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/references/allWorkBook Object pix.png -------------------------------------------------------------------------------- /references/ast-WHERE-multiple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/references/ast-WHERE-multiple.png -------------------------------------------------------------------------------- /references/ast-WHERE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/references/ast-WHERE.png -------------------------------------------------------------------------------- /references/ast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/references/ast.png -------------------------------------------------------------------------------- /references/queryHeaders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/references/queryHeaders.png -------------------------------------------------------------------------------- /references/togglecheckboxFunction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/Boost/2d6ffdad1592a7ac2d43408db071030d6c34e218/references/togglecheckboxFunction.png -------------------------------------------------------------------------------- /src/commands/commands.html: -------------------------------------------------------------------------------- 1 | <!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. --> 2 | 3 | <!DOCTYPE html> 4 | <html lang="en"> 5 | 6 | <head> 7 | <meta charset="UTF-8" /> 8 | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 9 | <meta name="viewport" content="width=device-width, initial-scale=1" /> 10 | <!-- Office JavaScript API --> 11 | <script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script> 12 | <title>Boost 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/commands/commands.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | /* global global, Office, self, window */ 7 | 8 | Office.onReady(() => { 9 | // If needed, Office.js is ready to be called 10 | }); 11 | 12 | /** 13 | * Shows a notification when the add-in command is executed. 14 | * @param event 15 | */ 16 | function action(event: Office.AddinCommands.Event) { 17 | const message: Office.NotificationMessageDetails = { 18 | type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, 19 | message: "Performed action.", 20 | icon: "Icon.80x80", 21 | persistent: true, 22 | }; 23 | 24 | // Show a notification message 25 | Office.context.mailbox.item?.notificationMessages.replaceAsync("action", message); 26 | 27 | // Be sure to indicate when the add-in command function is complete 28 | event.completed(); 29 | } 30 | 31 | function getGlobal() { 32 | return typeof self !== "undefined" 33 | ? self 34 | : typeof window !== "undefined" 35 | ? window 36 | : typeof global !== "undefined" 37 | ? global 38 | : undefined; 39 | } 40 | 41 | const g = getGlobal() as any; 42 | 43 | // The add-in command functions need to be available in global scope 44 | g.action = action; 45 | -------------------------------------------------------------------------------- /src/excelFunction.ts: -------------------------------------------------------------------------------- 1 | /* global Excel */ 2 | 3 | /** 4 | * Get the active worksheet 5 | * @param {object} 6 | * @return {object} 7 | */ 8 | export const getSheet = (context: Excel.RequestContext): Excel.Worksheet => { 9 | return context.workbook.worksheets.getActiveWorksheet(); 10 | }; 11 | 12 | /** 13 | * Select a range of cells in the excel sheet 14 | * @param {object} 15 | * @return {object} 16 | */ 17 | export const selectRange = (range: Excel.Range): void => range.select(); 18 | 19 | /** 20 | * selects all the cells that are filled 21 | */ 22 | // const range = excelFuncs.getSheet(context).getUsedRange(); 23 | -------------------------------------------------------------------------------- /src/functions/functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Boost Functions 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/functions/functions.ts: -------------------------------------------------------------------------------- 1 | /* global clearInterval, console, CustomFunctions, setInterval */ 2 | 3 | /** 4 | * Adds two numbers. 5 | * @customfunction 6 | * @param first First number 7 | * @param second Second number 8 | * @returns The sum of the two numbers. 9 | */ 10 | export function add(first: number, second: number): number { 11 | return first + second; 12 | } 13 | 14 | /** 15 | * Returns the current time. 16 | * @returns String with the current time formatted for the current locale. 17 | */ 18 | export function currentTime(): string { 19 | return new Date().toLocaleTimeString(); 20 | } 21 | 22 | /** 23 | * Increments a value once a second. 24 | * @customfunction 25 | * @param incrementBy Amount to increment 26 | * @param invocation Custom function handler 27 | */ 28 | export function increment(incrementBy: number, invocation: CustomFunctions.StreamingInvocation): void { 29 | let result = 0; 30 | const timer = setInterval(() => { 31 | result += incrementBy; 32 | invocation.setResult(result); 33 | }, 1000); 34 | 35 | invocation.onCanceled = () => { 36 | clearInterval(timer); 37 | }; 38 | } 39 | 40 | /** 41 | * Writes a message to console.log(). 42 | * @customfunction LOG 43 | * @param message String to write. 44 | * @returns String to write. 45 | */ 46 | export function logMessage(message: string): string { 47 | console.log(message); 48 | 49 | return message; 50 | } 51 | -------------------------------------------------------------------------------- /src/taskpane/components/App.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import NavBar from "./NavBar"; 3 | import Query from "./Query"; 4 | import "../taskpane.css"; 5 | import { Contexts } from "./Contexts"; 6 | /* global JSX */ 7 | 8 | /* 9 | copies the curent workbook and insert new sheet directly after 10 | 11 | await Excel.run(async (context) => { 12 | let myWorkbook = context.workbook; 13 | let sampleSheet = myWorkbook.worksheets.getActiveWorksheet(); 14 | let copiedSheet = sampleSheet.copy(Excel.WorksheetPositionType.after, sampleSheet); 15 | await context.sync(); 16 | }); 17 | 18 | https://docs.microsoft.com/en-us/office/dev/add-ins/excel/excel-add-ins-worksheets 19 | */ 20 | 21 | /** 22 | * CURRENT FEATURES 23 | * - Excel Add-in Integration 24 | * - React-Table, ability to interact and filter each column 25 | * - SELECT (columns) Querying 26 | */ 27 | export default (): JSX.Element => { 28 | const [page, setPage] = useState(); 29 | const [js, setJs] = useState(""); 30 | const [library, setLibrary] = useState([]); 31 | const [index, setIndex] = useState(0); 32 | 33 | return ( 34 |
35 | 36 | 37 | {page} 38 | 39 |
40 | ); 41 | }; 42 | -------------------------------------------------------------------------------- /src/taskpane/components/Contexts.tsx: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | export const Contexts = createContext(null); 4 | -------------------------------------------------------------------------------- /src/taskpane/components/IDE.tsx: -------------------------------------------------------------------------------- 1 | /* global JSX console */ 2 | import React, { useContext, useEffect } from "react"; 3 | import FuncInput from "./ide/FuncInput"; 4 | import FuncLibrary from "./ide/FuncLibrary"; 5 | import { Contexts } from "./Contexts"; 6 | 7 | export default (): JSX.Element => { 8 | const { js, setJs, library, setLibrary, index, setIndex } = useContext(Contexts); 9 | 10 | const handleSave = () => { 11 | // const customFunc = document.getElementById() 12 | const restoreFunc = () => { 13 | setJs(js); 14 | setIndex(index); 15 | }; 16 | 17 | setLibrary((prev: any) => { 18 | if (index === library.length) 19 | return prev.concat( 20 |
  • 21 | {js} 22 |
  • 23 | ); 24 | 25 | const first = prev.slice(0, index); 26 | first.push( 27 |
  • 28 | {js} 29 |
  • 30 | ); 31 | return first.concat(prev.slice(index + 1)); 32 | }); 33 | 34 | setJs(""); 35 | }; 36 | 37 | useEffect(() => { 38 | setIndex(library.length); 39 | }, [library]); 40 | 41 | useEffect(() => { 42 | console.log("index:", index); 43 | }, [index]); 44 | 45 | return ( 46 | <> 47 |
    48 | 49 |
    50 | {/*
    51 |