Office Scripts

Office Scripts allow you to record your actions and generate the corresponding TypeScript code to allow the actions to be automated.
Office Scripts / Automate Tab is only available in Office on the Web, not Desktop.
Once this feature has been enabled within the Office 365 environment you will see an additional Automate tab appear at the top.

alt text


TypeScript = JavaScript + Type Definitions
TypeScript adds additional syntax to JavaScript to support data types, variables, functions etc.
link -

alt text

Main Function

The main function is the entry point for a script.
The workbook argument represents the Excel file and must be included in this main function.

function main(workbook: ExcelScript.Workbook) { 
   const sheet = workbook.getWorksheet('Sheet1');
   if (sheet) {

Script Lab Add-in

This is a FREE Microsoft add-in that helps you create, run and share your TypeScript code.
It can be installed from the Microsoft Office App Store.
Script Lab is available on Desktop (Windows + Mac) and in Office on the Web.

alt text

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopNext