清单中的 VersionOverrides 会破坏 Excel 桌面上的 Excel 加载项,但不会破坏 365
我正在尝试为 Excel 创建一个加载项,并且一切都可以在 Excel Online 上正常工作,但是当尝试使其适用于 Excel 桌面时,它仅在注释掉 VersionOverrides 中的所有标记时才有效。有什么想法为什么会发生这种情况吗?
<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>889d898d-86a1-4489-b156-b61bee7ffa11</Id>
<Version>1.0.0.0</Version>
<ProviderName>SourceWhale</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="SourceWhale Add-In Testing"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://dl.dropboxusercontent.com/s/2rorwy0vdjaw6cr/32.png?dl=0"/>
<HighResolutionIconUrl DefaultValue="https://dl.dropboxusercontent.com/s/uftjc9ztis7r2yp/64.png?dl=0"/>
<SupportUrl DefaultValue="https://sourcewhale.app/dashboard"/>
<AppDomains>
<AppDomain>https://sourcewhale.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.3">
<Set Name="ExcelApi" MinVersion="1.3"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="SourceWhale Button">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,f_auto,q_auto:eco,dpr_1/qksbdyt3lus5cs8k1amh"/>
<bt:Image id="Icon.32x32" DefaultValue="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,f_auto,q_auto:eco,dpr_1/qksbdyt3lus5cs8k1amh"/>
<bt:Image id="Icon.80x80" DefaultValue="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,f_auto,q_auto:eco,dpr_1/qksbdyt3lus5cs8k1amh"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="SourceWhale has been added successfully!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="SourceWhale"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="SourceWhale"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Go to the HOME tab and click on the SourceWhale logo to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to open the SourceWhale Add-In"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
该插件在被注释掉时工作得很好,但错过了覆盖所公开的功能,并且仅仅注释并不是一个好的解决方案,因为理想情况下它可以在两者上工作,但具有可能的最佳功能。
我的excel是最新的365订阅版本。
I am trying to create an add-in for excel, and everything works great with excel online, however when trying to make it work for excel desktop, it only works when commenting out all the markup in VersionOverrides. Any ideas why this is happening?
<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>889d898d-86a1-4489-b156-b61bee7ffa11</Id>
<Version>1.0.0.0</Version>
<ProviderName>SourceWhale</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="SourceWhale Add-In Testing"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://dl.dropboxusercontent.com/s/2rorwy0vdjaw6cr/32.png?dl=0"/>
<HighResolutionIconUrl DefaultValue="https://dl.dropboxusercontent.com/s/uftjc9ztis7r2yp/64.png?dl=0"/>
<SupportUrl DefaultValue="https://sourcewhale.app/dashboard"/>
<AppDomains>
<AppDomain>https://sourcewhale.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.3">
<Set Name="ExcelApi" MinVersion="1.3"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="SourceWhale Button">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,f_auto,q_auto:eco,dpr_1/qksbdyt3lus5cs8k1amh"/>
<bt:Image id="Icon.32x32" DefaultValue="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,f_auto,q_auto:eco,dpr_1/qksbdyt3lus5cs8k1amh"/>
<bt:Image id="Icon.80x80" DefaultValue="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,f_auto,q_auto:eco,dpr_1/qksbdyt3lus5cs8k1amh"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="SourceWhale has been added successfully!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="SourceWhale"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="SourceWhale"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Go to the HOME tab and click on the SourceWhale logo to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to open the SourceWhale Add-In"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
The addin works perfectly fine when it's commented out, but misses the features exposed by the overrides, and just commenting isn't a good solution because ideally it would work on both, but with the best features possible.
My excel is the most up to date 365 subscription version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,问题在于,在Excel的桌面版本上,图像的URL必须以某种形式为单位。更改这解决了我的所有问题
So the issue was that on the desktop version of Excel, the URL to the images has to be in a certain form. Changing this fixed all my issues