Reputation: 11
I have an Excel 2016 taskpane add-in written which worked flawlessly both online and on desktop. However, now that I am trying to convert it into a command add-in, I have stumbled accross a really odd deployment issue concerning this manifest
:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:325c27b6-9566-4641-a1c6-175f0039f620-->
<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"
>
<!--BasicSettings-->
<Id>bcb30953-453a-4cbb-93c3-f3d289de0ee3</Id>
<Version>1.1.5.6</Version>
<ProviderName>My Corporation</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="MyAddin" />
<Description DefaultValue="My addin's description"/>
<IconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" />
<HighResolutionIconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" />
<SupportUrl DefaultValue="https://google.com" />
<!-- http://dev.office.com/reference/add-ins/office-add-in-requirement-sets -->
<Permissions>ReadWriteDocument</Permissions>
<!--EndBasicSettings-->
<!--BeginTaskpaneMode-->
<Hosts>
<Host Name="Workbook" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://odsample.azurewebsites.net/Pages/Home.aspx" />
</DefaultSettings>
<!--EndTaskpaneMode-->
<!--BeginAddinCommandsMode-->
<!-- https://github.com/OfficeDev/Office-Add-in-Commands-Samples/blob/master/Tools/XSD/TaskPaneAppVersionOverridesV1_0.xsd -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Description resid="MyAddin.Description" />
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<GetStarted>
<Title resid="MyAddin.Title"/>
<Description resid="MyAddin.Description"/>
<LearnMoreUrl resid="MyAddin.LearnMore"/>
</GetStarted>
<FunctionFile resid="MyAddin.FunctionFile" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="MyAddin" >
<Group id="MyAddin.Tab1.Group1">
<Label resid="MyAddin.Tab1.Group1.Label" />
<Icon>
<bt:Image size="16" resid="MyAddin.Tab1.Group1.Icon.16" />
<bt:Image size="32" resid="MyAddin.Tab1.Group1.Icon.32" />
<bt:Image size="80" resid="MyAddin.Tab1.Group1.Icon.80" />
</Icon>
<Control xsi:type="Button" id="MyAddin.Tab1.Group1.RunFunctionButton">
<Label resid="MyAddin.Tab1.Group1.RunFunctionButton.Label" />
<Supertip>
<Title resid="MyAddin.Tab1.Group1.RunFunctionButton.Title" />
<Description resid="MyAddin.Tab1.Group1.RunFunctionButton.Description" />
</Supertip>
<Icon>
<bt:Image size="16" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.16" />
<bt:Image size="32" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.32" />
<bt:Image size="80" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>writeText</FunctionName>
</Action>
</Control>
</Group>
<Label resid="MyAddin.Tab1.Label"/><!-- order is important-->
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="MyAddin.Tab1.Group1.Icon.16" DefaultValue="https://i.imgur.com/FkSShX9.png" />
<bt:Image id="MyAddin.Tab1.Group1.Icon.32" DefaultValue="https://i.imgur.com/FkSShX9.png" />
<bt:Image id="MyAddin.Tab1.Group1.Icon.80" DefaultValue="https://i.imgur.com/FkSShX9.png" />
<bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.16" DefaultValue="https://i.imgur.com/qDujiX0.png" />
<bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.32" DefaultValue="https://i.imgur.com/qDujiX0.png" />
<bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.80" DefaultValue="https://i.imgur.com/qDujiX0.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="MyAddin.LearnMore" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" />
<bt:Url id="MyAddin.FunctionFile" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="MyAddin.Title" DefaultValue="MyAddin" />
<bt:String id="MyAddin.Tab1.Label" DefaultValue="MyAddin" />
<bt:String id="MyAddin.Tab1.Group1.Label" DefaultValue="Execute Function" />
<bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Label" DefaultValue="Execute Function" />
<bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Title" DefaultValue="Execute Function" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="MyAddin.Description" DefaultValue="MyAddin's description" />
<bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Description" DefaultValue="Click to Execute Function" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!--EndAddinCommandsMode-->
</OfficeApp>
, which is mostly based on the official command addin example. This manifest, as it is, can be perfectly imported on Excel Online for testing and shows the expected commands group on the ribbon. However, it fails to be imported on the desktop version of Excel, since no addin at all is shown after clicking on 'Insert'=>'My Addins'=>'Shared folder' (where I store the manifests for testing purposes), which to my current understanding is due to some kind of failed validation.
After long hours of trial and error, I am pretty sure the xml namespaces and schema definitions are to be blamed. However, I am still struggling.
I have checked that if I change <VersionOverrides>
to <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.0">
(note the extra trailing /1.0
), then I can deploy the manifest both online and on desktop, but then they both fallback to the taskpane version (which as far as I understand is due to the fact of the <VersionOverrides>
part being omited because of malformation.
In a similar question, where the problem lay on the declaration of the namespaces being uncompleted, the accepted answer opted for using <OfficeApp xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0>
(note the extra /1.0) and
`. When using this configuration, I get the add-in to work as expected online (command add-in) but fails to even load on desktop.
Likewise, I am sure this is not a version problem, and thereby this question does not apply, since I am running Version: 16.0.7070.2033
, which theoretically meets the requirements.
As I said, I am really struggling to work out how to solve this issue. So, any help will be utterly appreciated (I am so tired I am problably missing something obvious). Thanks
Upvotes: 0
Views: 290
Reputation: 11
There seems to be a limit on the length of the id
attribute that can be used. Sticking to 32-character strings solved the problem for me.
Upvotes: 1