office-scriptsms-office-script

Is it possible to edit office scripts for Excel on the web in VS Code and use git for source control?


I am using a Microsoft 365 work account and I want to develop Office Scripts for Excel to automate monthly Excel tasks that I can also share with other co-workers. Sharing a Script has been fine. But as I am developing the Scripts, I really want source control and to document the development process. I was hoping to use VS Code (either desktop or on the web version) to edit and version control (git) the script.

There is an Office Script Extension for VS Code that is only available for the Browser/On the Web version of the VS Code. However, I can't find any documentation for the usage of the extension. It seems like I need to connect the Code Editor (found in the Automate tab of Excel on the Web) to VS Code somehow, but again, I haven't found a way to do this. Is what I am wanting to do even possible? I am hoping the Office Scripts Extension will handle .osts conversion to something I can edit in VS Code (just like the Code Editor), or I would even be fine with version control if the Code Editor itself supported it (since it seems to be based off VS Code anyway), but I haven't found a solution so far.


Solution

  • The VS Code extension for Office Scripts was pulled from preview and is no longer available. The in-Excel version is currently the only IDE where you'll have the support you'd expect from an IDE (like IntelliSense).

    As for file storage, the .osts files need to be on OneDrive or SharePoint. As Skin alludes to in your question's comments, you could make solution that updates that file in OD/SP from elsewhere, but that will require a much larger solution (which seems like it warrants its own Stack question).