Introduction
In this article, we will see how to create an Excel add-in and how to run it.
Excel add-in is an application that we can run inside Excel to increase functionality. We can build Excel add-ins by using HTML, CSS, JavaScript, C#, or any other technology. It does not matter what platform we are using. It will work (Excel for Windows, Mac, web- office 365 account).
Steps to Create Excel Add-in
Step 1. We need to install the Yeoman generator (yo) and generator office globally using npm.
Step 2. Run npm install -g yo generator-office to install yo and office project template generator globally.
Step 3. Run your office command to create an add-in project.
Step 4. When you run the above command, it will ask for the below information.
- Choose a project type: Office Add-in Task Pane project
- Choose a script type: JavaScript
- What do you want to name your add-in?: My Office Add-in
- Which Office client application would you like to support?: Excel
Once you complete the wizard, the generator will create the project and install supporting Node components.
Step 5. Go to your project using this command cd "My Office Add-in".
Step 6. Run this command to start the development server npm run dev-server.
Step 7. Run npm. Start this command to run your add-ins.
Step 8. Once you run the above command, it opens Excel desktop apps with your add-ins. You can see your add-ins in the Home Tab.
Step 9. When you click on add-ins, a side pane will open.
Conclusion
This is how we can easily create an Excel add-in and test it. Using office add-ins, we can increase our office functionality.