As with most Microsoft Garage projects, Script Lab had humble beginnings. It came out of a hackathon project at the company’s //oneweek 2016 event. The goal was to simplify the building of Office add-ins, and the Script Lab team has been successful.

After months of further development, you can now use Script Lab to easily test Office’s JavaScript APIs. It lets you open a code window from which you can write and execute JavaScript with ease.

In part, it’s a training tool. It lets developers play around with code to quickly create prototypes and modify them. It also means those with little experience can play around without complex setups. It requires no extra apps or configuration and can be done inside of the Office program.

Script Lab Features

According to Microsoft, ScriptLab has three main features that benefit developers:

  • Code in a pane beside your spreadsheet. IntelliSense is there while you type so you can easily discover and use the Office JavaScript objects and methods. And if you don’t want to start from scratch there are plenty of samples preinstalled with Script Lab. Your snippets can use any TypeScript features like arrow functions, template strings, and async/await. But it’s not only script: your snippets can also use HTML, CSS, and references to external libraries and data on the web. Script Lab uses the Monaco editor, the same tech that powers VS Code, so it’s beautiful and lightweight.
  • Run the code in another pane beside the editor. Execution can include logic, API calls to Office, UI in the pane, and even output to a console. Every time you make a code change you can refresh the editor and run the new version in seconds.
  • Share your snippets through GitHub. If you create a snippet you’d like to share, you can use Script Lab to save it. Then send the link to someone else to try it and tweak it on their computer. The Import feature lets you load other people’s snippets.”

You can get hold of Script Lab today by simply installing it from the Office store. The tool is free of charge and works with Office 2013 or later, as well Office online and Mac. More information is available on GitHub.