• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Script Lab – Explore the Office JavaScript API & Learn to Build Add-Ins

You are here: Home / Excel / Script Lab – Explore the Office JavaScript API & Learn to Build Add-Ins
Script Lab Logo
June 6, 2017 by Philip Treacy

Microsoft recently announced a project called Script Lab, previously known as 'Add-In Playground', which aims to help you learn how to write add-ins for Office.

Script Lab is actually an add-in itself and runs in Excel, Word or PowerPoint and can be installed from the Office Store.

Script Lab will run in Excel, Word, or PowerPoint 2013 Service Pack 1 or later. It also runs on Mac and online versions of these programs. A list of all the supported programs can be found on the Office Store (link above).

Here's Microsoft's promotional video which gives you some idea of what's possible in Script Lab.

Your browser does not support modern web standards. Please update it.

 

So What Can I Do With It?

Well, you can learn to use the Office JavaSctipt API from within Excel (or Word or PowerPoint), and develop add-ins.

The Office JavaScript API came out with Office 2013 and you can read more on it here.

Script Lab allows you to create code that includes JavaScript, HTML and CSS so you can start to cross over to becoming an Office/web developer - that's the way things are going.

The code you write can be run inside Excel and you can see the results in the Task Pane or in the worksheet.

A selection of sample code is provided so you can pick that apart to see how things work.

If you want to contribute to the project, the code for Script Lab is open and waiting for your input.

Installation

Installing Script Lab is straight forward, just get it from the Office Store, nothing else is needed.

But, when I installed it to my Excel 2013, I got errors when trying to run the supplied code snippets:

Script Lab Error

Script Lab Error 2

Even though I was running Service Pack 1 for Office 2013, I decided to try reinstalling. That also met with failure:

Office 2013 SP1 Install failed

so I gave up with 2013 and installed it to my laptop running Office 2016 and everything worked fine.

I suspect the sample snippets I was trying to run were specifically built for Office 2016 so wouldn't run in 2013. But this is not made clear anywhere. There is one 2013 sample snippet and that did run without a hitch.

Interface

In Excel 2016 you'll find that you have an extra section on your Ribbon

Script Lab section of Ribbon

You can also access Script Lab via Insert -> My Add-Ins.

Features

You write code in a pane inside Excel. IntelliSense shows suggestions while you type so you can explore the Office JavaScript objects and methods.

If you are familiar with JavaScript you might notice the $ indicating that this code is using jQuery. External libraries can be imported and used like any web page.

Writing code in Excel

Your code can run in another pane beside the editor, and code can include API calls to Office, UI in the pane, or output to the JavaScript console. Changes to the code can be run in seconds making debugging and development quick.

The Template window is where you write your HTML.

HTML Template window

CSS goes in the Style window, although this snippet has none, there are still CSS styles used in the HTML and CSS can be imported in the Libraries window.

Style window

Import JavaScript and CSS in the Libraries window.

Libraries window

When you run your code it looks like a browser window. You can see the JavaScript console for messages and errors.

Console

and you can inspect the DOM (Document Object Model)

DOM Inspector

As you can see of course, this is all geared towards the web developer and will be familiar with anyone who has built web sites.

Your code snippets can be shared through GitHub. You just send them the link to your code and they can give it a try. Likewise, the Import feature lets you load other people’s snippets.

Sharing with GitHub

Script Lab Logo

More Excel Posts

tips for working in multiple excel files

Hacks for Working in Multiple Excel Files

Awesome tips for navigating, arranging and working in multiple Excel files. Guaranteed to streamline your workflow and increase productivity.
chatgpt for excel

ChatGPT for Excel

Using ChatGPT for Excel can be hit and miss. Learn the best uses for ChatGPT to make your Excel life easier and what to avoid using it for.
excel templates

Where to Find Free Excel Templates

Where to find free Excel templates and how to create your own Excel templates. Using templates saves time and effort.
Easily Remove Password Protection from Excel Files

Easily Remove Excel Password Protection

How to remove Excel password protection when you’ve forgotten the password. Works for sheets, workbooks and read only files.
Import data from a picture to Excel

Import Data from a Picture to Excel

Import data from a picture to Excel. Works with pictures from a file or the clipboard and loads it to the spreadsheet.
excel online

5 Excel Online Features Better than Desktop

5 Excel Online Features Better than Desktop including searchable data validation, track changes, single line ribbon and more.

10 Common Excel Mistakes to Avoid

10 common Excel mistakes to avoid, including merge cells, external links, formatting entire rows/columns and more.
new Excel features

Cool New Features in Excel for Microsoft 365

Cool New Features in Excel for Microsoft 365 including the navigation pane, smooth scroling, unhide multiple sheets and more.
dynamic dependent data validation

Dynamic Dependent Data Validation

Dynamic Dependent Data Validation with dynamic array formulas like FILTER make it quick and easy to set up.
QAT

Excel Quick Access Toolbar

The Excel Quick Access Toolbar is not only a handy for your mouse, but it also enables some super easy keyboard shortcuts.


Category: Excel
Previous Post:Excel Dates Displayed in Different Languages
Next Post:Set Excel PivotTable Default Layout

Reader Interactions

Comments

  1. Azid Imdad

    April 3, 2021 at 11:58 am

    Hi there,

    I do not have any IT (coding) background and want to learn JavaScript for Excel automation. Can anyone help where should I find resources/training.

    Thanks in anticipation.

    Regards,

    Azid

    Reply
    • Philip Treacy

      April 8, 2021 at 3:28 pm

      Hi Azid,

      Have you tried https://docs.microsoft.com/en-us/office/dev/add-ins/reference/javascript-api-for-office

      Regards

      Phil

      Reply
  2. Mario Martin

    July 14, 2020 at 9:52 pm

    who can i uninstall “Script Lab” in Excel?

    Reply
    • Philip Treacy

      July 15, 2020 at 3:11 pm

      Hi Mario,

      File->Options>Add-Ins then choose the add-in to manage from the drop-down list at the bottom of the window.

      Regards

      Phil

      Reply
  3. Dean McMurchy

    June 9, 2017 at 11:52 pm

    For some reason I can install the Script Lab add-in, but I can’t get the Script Lab tab to show up on my ribbon. Any thoughts? I checked Options: File–>Options–>Customize Ribbon, but the Script Lab did not show as an available option to add to my ribbon. Any further insights?

    Reply
    • Catalin Bombea

      June 10, 2017 at 1:49 pm

      I suggest going to provider page, and report a new issue: https://github.com/OfficeDev/script-lab/issues
      Other things you can try: go to Insert tab, Add-ins group, and under My Add-ins you should find Script Lab, if it is installed. Click the Add button.
      Catalin

      Reply
  4. Tyler

    June 7, 2017 at 1:36 am

    For some reason I can install the Script Lab add-in, but I can’t get the Script Lab tab to show up on my ribbon. Any thoughts?

    Reply
    • Catalin Bombea

      June 8, 2017 at 2:07 pm

      Hi Tyler,
      Try to check the Options: File–>Options–>Customize Ribbon, see if the Script Lab check box is checked.
      Catalin

      Reply
  5. Giorgio

    June 6, 2017 at 5:36 pm

    Not sure why https://dev.office.com/reference/add-ins/javascript-api-for-office lists Access as one of the supported applications but then Access isn’t mentioned in https://dev.office.com/docs/add-ins/overview/requirements-for-running-office-add-ins and https://dev.office.com/docs/add-ins/overview/office-add-ins

    Reply
    • Catalin Bombea

      June 8, 2017 at 2:28 pm

      Hi Giorgio,
      Access is a valid Office Host: https://dev.office.com/docs/add-ins/overview/specify-office-hosts-and-api-requirements
      Not all Common API requirement sets are supported by all Office Hosts. See this page for a list of API requirement sets and the supported office hosts: https://dev.office.com/reference/add-ins/requirement-sets/office-add-in-requirement-sets
      Catalin

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.