| page_type | sample | |||||||
|---|---|---|---|---|---|---|---|---|
| urlFragment | office-excel-content-add-in | |||||||
| products |
|
|||||||
| languages |
|
|||||||
| extensions |
|
|||||||
| description | A content add-in that sits in the grid and reads and writes workbook data. |
This sample is a content add-in for the fictional Humongous Insurance company. It shows how to use the Office JavaScript APIs to create an Excel add-in that exists in the grid, instead of as a task pane or ribbon button. Build upon this sample to embed rich, interactive objects into Office documents.
The Humongous Insurance add-in loads and embeds the content add-in in the grid. This control panel can be resized and moved as needed. The dropdown menus are populated from tables in the workbook. The Save Prospect button saves the user's input to the workbook.
The sample also populates the workbook with data when it loads.
- Excel on Windows
- Excel on Mac
- Excel on the web
- Excel on Windows with a minimum build of 16.0.14626.10000, or Excel on Mac with a minimum build of 16.55.21102600, or Excel on the web.
- Node.js (latest recommended version).
- npm version 8 or greater.
| Solution | Author(s) |
|---|---|
| Embed a content add-in in the Excel grid | Microsoft |
| Version | Date | Comments |
|---|---|---|
| 1.0 | 7-15-2025 | Ported this add-in to the main samples repo |
Take the following steps to run this sample and set up this add-in.
- Clone or download this repo.
- Go to the Samples/excel-content-add-in folder via the command line.
- Run
npm installto set up the add-in dependencies. - Run
npm start. This command opens Excel, sideloads the add-in in Excel, and embeds the content add-in in the grid. - Resize the content add-in as needed.
- Use the dropdown menus and the Save prospect button to add new insurance client prospects.
- To stop the server and uninstall the add-in from Excel, run
npm stop.
Note: To sideload this add-in sample in Excel on the web, see Sideload Office Add-ins to Office on the web.
- Did you experience any problems with the sample? Create an issue and we'll help you out.
- We'd love to get your feedback about this sample. Go to our Office samples survey to give feedback and suggest improvements.
- For general questions about developing Office Add-ins, go to Microsoft Q&A using the office-js-dev tag.
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
