Overview

Office add-ins are helpful in extending Office applications and dealing with Office document contents. Visual Studio has been the popular developer IDE to build the Office add-ins. On the other hand, web technologies like HTML, CSS, and JavaScript can be used to develop Office add-in platforms independently, compared to Visual Studio which supports developers to write their applications on the Windows platform.

In this article, we will explore the Yeoman Generator for Office Add-ins and set up a developer machine for add-in development.

Yeoman Generator for building Office Add-ins

Yeoman is an open-source scaffolding tool to generate projects based on available templates. It also supports creating projects for Office. Yeoman runs through a wizard of questions to scaffold the project. It can be thought of as a replacement for File > New Project experience in Visual Studio. It can be used to create Office add-ins for,

Development with Yeoman generator and Visual Studio

We have multiple options to start building our Office Add-ins. Yeoman Generator offers more options compared to Visual Studio for development.

Yeoman generator

Visual Studio

Setup Developer Environment

Follow the below set of commands to get your developer environment ready.

Install Node JS

Install the latest LTS version from here.

If you already have NodeJS installed, check the version

node -v

Install Code Editor

Install any of the below code editors

Install Yeoman and bower

Run the below command (to install globally)

npm install -g yo bower

Install Yeoman Generator for Office Add-ins

Run the below command

npm install -g generator-office

NPM packages Update

Yeoman, Bower, Yeoman Office add-ins Generator gets installed as NPM packages. Use the below commands to check and update them.

To update NPM,

npm i -g npm

To check outdated packages,

npm outdated --global

This command will report packages that need updates. Use the below command to update the reported packages.

npm update -g <package-name>

Summary

Office add-ins offer to extend Office applications. Yeoman Generator for Office Add-ins is useful for developing Office add-ins platform independently as compared to Visual Studio which is Windows platform dependent.

References