Add a Custom HTML or JavaScript Visual to Microsoft Excel
Question details
Add a custom visual created with HTML, CSS, and JavaScript to a Microsoft Excel worksheet.

- Product
- Microsoft Excel Office Add-ins
- Device & OS
- not provided
- Scenario
- The user wants to display or interact with a web-based custom visual from within an Excel workbook.
- Observed behavior
- Excel requires supported Office Add-in technology rather than the legacy Microsoft Web Browser ActiveX control for web-based custom visuals.
Prepare a web server that can host your HTML, CSS, JavaScript, and add-in manifest files over HTTPS. Use a version of Excel that supports Office Add-ins and enable access to your local or organizational add-in catalog if you plan to sideload the manifest.
Create and sideload an Office.js Excel add-in
Use this recommended method when your visual needs to run HTML, CSS, and JavaScript inside Excel through a supported task pane or content add-in.
Office.js add-ins are the supported replacement for legacy browser-based ActiveX controls. A manifest XML file tells Excel where to load your securely hosted web application and which Excel features the add-in uses.
Choose a task pane add-in for controls and workflows beside the worksheet, or choose a content add-in when the web experience should appear within the worksheet surface.
Decide whether to create an Excel task pane add-in or a content add-in. Use a task pane for interactive controls, and use a content add-in when the visual should be placed in the workbook.
Build the visual with HTML, CSS, and JavaScript, then include the Office.js library in your page so it can communicate with Excel through the Office JavaScript API.
Create an XML manifest that defines the add-in name, permissions, supported hosts, and the HTTPS URL for your task pane or content page. Set the host to Excel in the manifest configuration.
Upload the manifest-referenced HTML, JavaScript, CSS, and supporting assets to an HTTPS endpoint. Excel add-ins must load web content from trusted secure URLs.
In Excel, open the Insert tab, select Add-ins or My Add-ins, then choose Manage My Add-ins or Upload My Add-in and select the manifest XML file. Follow your organization's add-in catalog process if upload is restricted.
Open the add-in from the Insert tab or the workbook location where it was added, then test Office.js calls such as reading worksheet ranges, updating cells, or responding to selection changes.

Deploy the Excel add-in through an organization catalog
Use this option when the custom visual must be distributed to multiple users instead of being sideloaded on individual computers.
Use WPS Office for everyday Excel workbook editing
Office.js custom add-ins are a Microsoft Excel technology and must be developed and deployed through Microsoft's add-in platform. For everyday spreadsheet creation, editing, and sharing, WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and smooth migration for standard Excel files.

Frequently Asked Questions
Can I insert raw HTML directly into an Excel worksheet?
No. Excel does not provide a standard worksheet feature for running arbitrary HTML and JavaScript directly in cells. Create an Office.js task pane or content add-in and load the web content through its manifest instead.
What is the difference between an Excel task pane add-in and a content add-in?
A task pane add-in opens beside the worksheet and is best for commands, forms, and interactive tools. A content add-in is designed to display an embedded web experience within the workbook area.
Why must my Excel add-in files use HTTPS?
Excel add-ins load web content from secure endpoints to protect users and workbook data. Host the HTML, JavaScript, CSS, and related assets at HTTPS URLs referenced by the add-in manifest.
How do I test an Excel add-in before deployment?
Create the manifest XML, host the web app on HTTPS, then in Excel use Insert > Add-ins or My Add-ins and select Upload My Add-in to sideload the manifest for testing.
Does WPS Office support Microsoft Office.js Excel add-ins?
Office.js add-ins are built for Microsoft's Office Add-ins platform. Check the specific WPS Office version and add-in requirements before relying on a Microsoft Excel Office.js solution in WPS Office.




