[英]Office manifest passes with validate-office-addin but fails when uploading to Office 365
[英]Office add-in manifest file passes 'npm run validate' but fails when side loading to Office Web
我正在任务功能区中创建一个命令按钮,它为我们的 Office 用户添加了一些功能。 我开始使用yeoman generator ,当我运行npm start
时,插件在本地 MS Excel 上运行良好。 它验证成功运行npm run validate
。
但是,当我尝试在 Excel 上侧加载 manifest.xml 以在线测试它时(通过Office Add-ins > Upload My Add-in
),我尝试上传清单并立即返回消息:
Your add-in manifest is not valid.
对调试问题不是很有帮助的消息。 这是我的第一个加载项,所以我不知道如何继续,任何帮助将不胜感激。 加载项清单.xml 如下:
<?xml version="1.0" encoding="utf-8"?> <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>bae311b6-a1be-4055-a0fc-c0371d95dc89</Id> <Version>1.0.0.0</Version> <ProviderName>Test</ProviderName> <DefaultLocale>en-US</DefaultLocale> <DisplayName DefaultValue="Add-in Commands Sample" /> <Description DefaultValue="Sample that illustrates add-in commands basic control types and actions" /> <IconUrl DefaultValue="https://i.imgur.com/oZFS95h.png" /> <SupportUrl DefaultValue="https://www.sfchronicle.com/terms_of_use/" /> <Hosts> <Host Name="Workbook"/> </Hosts> <DefaultSettings> <SourceLocation DefaultValue="https://commandsimple.azurewebsites.net/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="Contoso.GetStarted.Title"/> <Description resid="Contoso.GetStarted.Description"/> <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/> </GetStarted> <FunctionFile resid="Contoso.FunctionFile.Url" /> <ExtensionPoint xsi:type="PrimaryCommandSurface"> <CustomTab id="Contoso.Tab1"> <Group id="Contoso.Tab1.Group1"> <Label resid="Contoso.Tab1.GroupLabel" /> <Icon> <bt:Image size="16" resid="Contoso.PublishButton.Icon" /> <bt:Image size="32" resid="Contoso.PublishButton.Icon" /> <bt:Image size="80" resid="Contoso.PublishButton.Icon" /> </Icon> <Control xsi:type="Button" id="Contoso.FeedsButton"> <Label resid="Contoso.FeedsButton.Label" /> <Supertip> <Title resid="Contoso.FeedsButton.Label" /> <Description resid="Contoso.FeedsButton.Tooltip" /> </Supertip> <Icon> <bt:Image size="16" resid="Contoso.FeedsButton.Icon" /> <bt:Image size="32" resid="Contoso.FeedsButton.Icon" /> <bt:Image size="80" resid="Contoso.FeedsButton.Icon" /> </Icon> <Action xsi:type="ExecuteFunction"> <FunctionName>exportJSON</FunctionName> </Action> </Control> </Group> <Label resid="Contoso.Tab1.TabLabel" /> </CustomTab> </ExtensionPoint> </DesktopFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="Contoso.PublishButton.Icon" DefaultValue="https://localhost:3000/assets/livepublish.png" /> <bt:Image id="Contoso.FeedsButton.Icon" DefaultValue="https://localhost:3000/assets/livefeed.png" /> <bt:Image id="Contoso.TestPubButton.Icon" DefaultValue="https://localhost:3000/assets/testpublish.png" /> <bt:Image id="Contoso.TestFeedsButton.Icon" DefaultValue="https://localhost:3000/assets/testfeed.png" /> </bt:Images> <bt:Urls> <bt:Url id="Contoso.FunctionFile.Url" DefaultValue="https://localhost:3000/fnfile.html" /> </bt:Urls> <bt:ShortStrings> <bt:String id="Contoso.FeedsButton.Label" DefaultValue="Create Feed" /> <bt:String id="Contoso.PublishButton.Label" DefaultValue="Publish Project" /> <bt:String id="Contoso.TestFeedsButton.Label" DefaultValue="Create Test Feed" /> <bt:String id="Contoso.TestPubButton.Label" DefaultValue="Publish Test Project" /> <bt:String id="Contoso.Tab1.GroupLabel" DefaultValue="Publish Options" /> <bt:String id="Contoso.Tab1.TabLabel" DefaultValue="Devhub Deploy" /> <bt:String id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://www.sfchronicle.com/terms_of_use/" /> <bt:String id="Contoso.GetStarted.Title" DefaultValue="Deploy add-in was succesfully loaded"> <bt:Override Locale="ja-jp" Value="Deploy Title" /> </bt:String> </bt:ShortStrings> <bt:LongStrings> <bt:String id="Contoso.FeedsButton.Tooltip" DefaultValue="Click to create a feed for a project" /> <bt:String id="Contoso.PublishButton.Tooltip" DefaultValue="Click to publish a project" /> <bt:String id="Contoso.TestFeedsButton.Tooltip" DefaultValue="Click to create a test feed for a project" /> <bt:String id="Contoso.TestPubButton.Tooltip" DefaultValue="Click to publish a test project" /> <bt:String id="Contoso.GetStarted.Description" DefaultValue="Click a publish option"> <bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" /> </bt:String> </bt:LongStrings> </Resources> </VersionOverrides> </OfficeApp>
消除了可选元素,发现<GetStarted>
元素是有问题的部分。 我将其删除并能够将加载项导入 Office Web。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.