Office Scripts in Excel on the web let you automate your day-to-day tasks. You can record your Excel actions with the Action Recorder, which creates a script. You can also create and edit scripts with the Code Editor. Your scripts can then be shared across your organization so your coworkers can also automate their workflows.
This series of documents teaches you how to use these tools. You'll be introduced to the Action Recorder and see how to record your frequent Excel actions. You'll also learn how to make or update your own scripts with the Code Editor.
Collaborate for free with an online version of Microsoft Excel. Save spreadsheets in OneDrive. Share them with others and work together at the same time. For the best experience, work together in Excel for the web and see real-time changes. Under Share, you'll see the names of who else is also editing the file. Colored cells show you exactly each person is working in the workbook. Click a color to see who's editing that cell. With Microsoft 365, work within an Excel file from mobile, desktop, and web. 2 Make analog spreadsheets digital with a camera click You now can add data to Excel directly from a photo. Excel for the web gives you the power of Excel on any device, from almost anywhere. Here are some of the great features to try out: Sign in to Office.com for the best place to get started. Select Excel to see recent files and templates, or create a new blank workbook. Excel for the web (aka Excel Online) now has scripting functionality akin to VBA! We are in the early stages of this new scripting language, however, if you would like to get a head start in learning this new language to automate tasks on Microsoft’s online Apps (this does not work for Desktop appsfor now), you may be able to convince your Admin to turn on this new feature.
Requirements
Note
Office Scripts in Excel on the web is in public preview. The functionality described here is subject to change as the feature develops. You can submit feedback on Office Scripts through the Help > Feedback button in Excel. You can submit feedback about the documentation to the OfficeDev/office-scripts-docs GitHub repository.
To use Office Scripts, you'll need the following.
Excel on the web (other platforms, such as desktop, are not supported).
OneDrive for Business.
Any commercial or educational Microsoft 365 license with access to the Microsoft 365 Office desktop apps, such as:
- Office 365 Business
- Office 365 Business Premium
- Office 365 ProPlus
- Office 365 ProPlus for Devices
- Office 365 Enterprise E3
- Office 365 Enterprise E5
- Office 365 A3
- Office 365 A5
Note
If you meet these requirements and are still not seeing the Automate tab, it's possible that your admin has disabled the feature or there's some other problem with your environment. Please follow the steps under Automate tab not appearing or Office Scripts unavailable to start using Office Scripts.
When to use Office Scripts
Microsoft Excel Web Training
Scripts allow you to record and replay your Excel actions on different workbooks and worksheets. If you find yourself doing the same things over and over again, you can turn all that work into an easy-to-run Office Script. Run your script with a button-press in Excel or combine it with Power Automate to streamline your entire workflow.
As an example, say you start your work day by opening a .csv file from an accounting site in Excel. You then spend several minutes deleting unnecessary columns, formatting a table, adding formulas, and creating a PivotTable in a new worksheet. Those actions you repeat daily can be recorded once with the Action Recorder. From then on, running the script will take care of your entire .csv conversion. You'll not only remove the risk of forgetting steps, but be able to share your process with others without having to teach them anything. Office Scripts automate your common tasks so you and your workplace can be more efficient and productive.
Action Recorder
The Action Recorder records actions you take in Excel and saves them as a script. With the Action recorder running, you can capture the Excel actions as you edit cells, change formatting, and create tables. The resulting script can be run on other worksheets and workbooks to recreate your original actions.
Microsoft Excel Webinar
Code Editor
Free Microsoft Excel Web
All scripts recorded with the Action Recorder can be edited through the Code Editor. This lets you tweak and customize the script to better suit your exact needs. You can also add logic and functionality that is not directly accessible through the Excel UI, such as conditional statements (if/else) and loops.
One easy way to start learning the capabilities of Office Scripts is to record scripts in Excel on the web and view the resulting code. Another option is to follow our tutorials to learn in a more guided and structured way.
Sharing scripts
Office Scripts can be shared with other users of an Excel workbook. When you share a script with others in a workbook, the script is attached to the workbook. Your scripts are stored in your OneDrive, and when you share one, you create a link to it in the workbook you have open.
More details about sharing and unsharing scripts can be in the article Sharing Office Scripts in Excel for the Web.
Note
Learn more about how scripts are stored in your OneDrive in Office Scripts file storage and ownership.
Connecting Office Scripts to Power Automate
Power Automate is a service that helps you create automated workflows between multiple apps and services. Office Scripts can be used in these workflows, giving you control of your scripts outside of the workbook. You can run your scripts on a schedule, trigger them in response to emails, and much more. Visit the Run Office Scripts in Excel on the web with Power Automate tutorial to learn the basics of connecting these automation services.
Microsoft Excel Website
Next steps
Microsoft Excel Web Browser
Complete the Office Scripts in Excel on the web tutorial to learn how to create your first Office Scripts.