Visual Studio Code for Office Scripts (preview)

Visual Studio Code for the Web lets users edit anything from anywhere. Connect your Office Scripts experience to this popular code editor to start scripting outside of the workbook.

An Excel on the web window with the Code Editor open next to a VS Code on the web window with an open script.

Visual Studio Code has a few advantages over the built-in Code Editor.

  • Full-screen editing! Your script doesn’t have to share screen space with the workbook any more.
  • Edit multiple scripts at once! Quickly switch between scripts to share code from your other automations.
  • Extensions! Use your favorite VS Code extensions for spell checking, formatting, and whatever else helps you get the job done.


This feature is in preview. It's subject to change based on feedback. If you encounter any issues, please report them through the Feedback button in Excel. The following are known issues with the current version of the feature.

  • Visual Studio Code can only be connected to Office Scripts through Excel on the web.
  • This Office Scripts connection is only available with English-language Excel clients.

Connect Visual Studio Code to Office Scripts

Follow these one-time steps to connect Visual Studio Code and Excel on the web.

  1. Open the Office Scripts Code Editor.
  2. Under the More options (…) menu, select Editor settings.
  3. Select (Preview) Visual Studio Code connection.

The editor settings task pane showing a checkbox labeled Visual Studio Code connection.

Now you can edit and run your scripts from Visual Studio Code. From any script, go to the More options (…) menu and select Open in VS Code.

The Open in VS Code option being selected from a list next to an open script.

See also