0
votes

I'm creating a command button in the task ribbon that adds some functionality for our Office users. I started using the yeoman generator, and the add-in works great on local MS Excel when I run npm start. It validates successfully running npm run validate.

But when I try to side load the manifest.xml on Excel online to test it (via Office Add-ins > Upload My Add-in), I try to upload the manifest and it immediately returns the message:

Your add-in manifest is not valid.

Not a very helpful message to debug the problem. This is my first add-in, so I'm not sure how to proceed, any help would be appreciated. The add-in manifest.xml is below:

<?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>
1
Try uploading your manifest with the VersionOverrides section removed. If that doesn't generate the error, put back the VersionOverrides but with only the required child elements. If that doesn't error, try putting back the optional child elements one-by-one, till you get the error.Rick Kirkham

1 Answers

0
votes

Eliminated the optional elements and found that the <GetStarted> element was the offending piece. I removed it and was able to import the add-in to Office Web.