'Excel failing to load basic custom functions add-in
First, environment:
Excel Version 1905 (Build 11629.20246 Click-To-Run) Connected to Office 365 ProPlus
Windows 10 Enterprise 10.0.16299 Build 16299
I've been trying to work with the Custom Functions API in Excel, but its consistently failing to load my Manifest. I'm using Visual Studio for development, and its handling side loading.
The Add-In seems to partially load, as the task pane does open up and load, but none of my custom functions register.
I've also run the example project from https://github.com/OfficeDev/Excel-Custom-Functions-JS and it fails to load with similar errors.
My administrator has granted me access to the Add-In store, thinking that may be part of the issue, but it did not help.
Its my belief that there is some GPO or setting that has disabled the Custom Functions API, but I'm not about to find any documentation about such a setting. I've done everything I can to confirm that the Manifest I'm providing is valid, but still Excel claims that its invalid.
The basic structure of the Web Project is as follows:
C:.
│ Home.html
│ packages.config
│ WaveyWeb.csproj
│ WaveyWeb.csproj.user
│ Web.config
│ Web.Debug.config
│ Web.Release.config
│
├───dist
│ functions.html
│ functions.js
│ functions.json
│
└───Properties
AssemblyInfo.cs
I've confirmed that the web server is serving the pages at the expected locations.
Here is the Manifest that I'm trying to load. Visual studio does NOT complain about it being invalid, and it is checking the schema. It does complain if I make any change that is invalid.
Note that ~remoteAppUrl
is being correctly transformed at build time
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<Id>515f3886-1c17-41be-8393-26b5acfd676a</Id>
<Version>1.0.0.0</Version>
<ProviderName>Adam</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Project Wavey" />
<Description DefaultValue="Its like excel, but with more waves"/>
<IconUrl DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
<SupportUrl DefaultValue="http://www.contoso.com" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Workbook" />
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="CustomFunctionsRuntime" MinVersion="1.1"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="~remoteAppUrl/Home.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="CustomFunc.URL.JS"/>
</Script>
<Page>
<SourceLocation resid="CustomFunc.URL.HTML"/>
</Page>
<Metadata>
<SourceLocation resid="CustomFunc.URL.JSON"/>
</Metadata>
<Namespace resid="CustomFunc.Namespace"/>
</ExtensionPoint>
</AllFormFactors>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Urls>
<bt:Url id="CustomFunc.URL.JS" DefaultValue="~remoteAppUrl/dist/functions.js"/>
<bt:Url id="CustomFunc.URL.HTML" DefaultValue="~remoteAppUrl/dist/functions.html"/>
<bt:Url id="CustomFunc.URL.JSON" DefaultValue="~remoteAppUrl/dist/functions.json"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="CustomFunc.Namespace" DefaultValue="WAVE" />
</bt:ShortStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
See my WEF Logs:
9/18/2019 9:33:42 Medium Web Add-In Runtime Logging Session Started
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Script", Line=52, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Page", Line=55, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Metadata", Line=58, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Namespace", Line=61, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Extension point list has no supported extension points for this client
9/18/2019 9:33:42 Monitorable Manifest Issue encountered while parsing manifest, add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Error at element "VersionOverrides" : Manifest override with unsupported requirements or no supported extension points ignored: http://schemas.microsoft.com/office/taskpaneappversionoverrides, VersionOverridesV1_0, Line=78, CharPosition=5
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Script", Line=52, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Page", Line=55, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Metadata", Line=58, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Skipped unrecognized XML element for add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Namespace", Line=61, CharPosition=14
9/18/2019 9:33:42 Monitorable Manifest Extension point list has no supported extension points for this client
9/18/2019 9:33:42 Monitorable Manifest Issue encountered while parsing manifest, add-in ID : 515f3886-1c17-41be-8393-26b5acfd676a, Location : Error at element "VersionOverrides" : Manifest override with unsupported requirements or no supported extension points ignored: http://schemas.microsoft.com/office/taskpaneappversionoverrides, VersionOverridesV1_0, Line=78, CharPosition=5
9/18/2019 9:34:43 Unexpected Manifest Access to the manifest XML file is denied. Contact an administrator of this add-in for help.
9/18/2019 9:34:43 Unexpected Catalog Access to your add-ins trusted catalog has been denied. Select Insert > My Add-ins > Excel Options > Trust Center > Trust Center Settings > Trusted Add-in Catalogs to check your trusted catalogs.
9/18/2019 9:34:43 Unexpected Manifest Access to the manifest XML file is denied. Contact an administrator of this add-in for help.
9/18/2019 9:34:47 Unexpected Manifest Access to the manifest XML file is denied. Contact an administrator of this add-in for help.
9/18/2019 9:34:47 Unexpected Catalog Access to your add-ins trusted catalog has been denied. Select Insert > My Add-ins > Excel Options > Trust Center > Trust Center Settings > Trusted Add-in Catalogs to check your trusted catalogs.
I think my issue is happening before the loading of the actual scripts, but for completeness here are the contents of the files in /dist/
functions.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title></title>
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/custom-functions-runtime.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
functions.js
/**
* Adds two numbers.
* @customfunction
* @param first First number.
* @param second Second number.
* @returns The sum of the two numbers.
*/
function add(first, second) {
return first + second;
}
CustomFunctions.associate("ADD", add);
functions.json
{
"functions": [
{
"id": "ADD",
"name": "ADD",
"description": "Add two numbers",
"helpUrl": "http://www.contoso.com/help",
"result": {
"type": "number",
"dimensionality": "scalar"
},
"parameters": [
{
"name": "first",
"description": "first number to add",
"type": "number",
"dimensionality": "scalar"
},
{
"name": "second",
"description": "second number to add",
"type": "number",
"dimensionality": "scalar"
}
]
}
]
}
Update Log when running the Excel Custom Functions example project found in https://github.com/OfficeDev/Excel-Custom-Functions
9/19/2019 13:22:06 Medium Web Add-In Runtime Logging Session Started
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Script", Line=35, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Page", Line=38, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Metadata", Line=41, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Namespace", Line=44, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Script", Line=35, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Page", Line=38, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Metadata", Line=41, CharPosition=14
9/19/2019 13:22:06 Monitorable Manifest Skipped unrecognized XML element for add-in ID : ca968be6-628b-4f14-ba3c-3e614effa9bd, Location : Element Namespace "http://schemas.microsoft.com/office/taskpaneappversionoverrides" : Element Name "Namespace", Line=44, CharPosition=14
Solution 1:[1]
I saw followings errors in the log:
9/18/2019 9:34:43 Unexpected Manifest Access to the manifest XML file is denied. Contact an administrator of this add-in for help.
9/18/2019 9:34:43 Unexpected Catalog Access to your add-ins trusted catalog has been denied. Select Insert > My Add-ins > Excel Options > Trust Center > Trust Center Settings > Trusted Add-in Catalogs to check your trusted catalogs.
You may need to share the folder by following below steps: 1. Open Excel->open a new workbook -> file ->options -> Trust Center -> Trust center settings -> Trusted Add-in Catalogs -> add network path of the folder containing the manifest file. And press ok and check the right side box 2. Close Excel and open it again,
Hope it is helpful.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | xiaochun-Microsoft |