简体   繁体   English

excel插件| 清单加载在桌面 excel 上显示错误

[英]excel add ins | on manifest loading showing error on desktop excel

I have created excel add-ins using office.js and react-fabric UI.我已经使用 office.js 和 react-fabric UI 创建了 excel 加载项。 I have created manifest and validated using command: npx --ignore-existing office-addin-manifest validate manifest.xml And it looks good with no issue.我已经创建了清单并使用命令进行了验证: npx --ignore-existing office-addin-manifest validate manifest.xml 它看起来不错,没有问题。 When I am uploading manifest in desktop excel, it showing below error on excel.当我在桌面 excel 中上传清单时,它在 excel 上显示以下错误。 Although its not blocking any add ins functionality but it giving wrong impression to user.虽然它没有阻止任何插件功能,但它给用户留下了错误的印象。 PFA SS of error: "Error loading add-ins"错误的 PFA SS: “加载加载项时出错” 错误

On click of Ribbon buttons its working as expected but on excel bottom it showing error on manifest load.单击功能区按钮时,它按预期工作,但在 excel 底部,它显示清单加载错误。

PSB is my manifest file and please help to identify the cause of this error as we need to release application to our customer but because of this error its causing blocker for our releasae. PSB 是我的清单文件,请帮助确定此错误的原因,因为我们需要向客户发布应用程序,但由于此错误,它会阻止我们发布。

    <?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">
    <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
    <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
    <Id>565764A6-0F6E-4D98-A1EF-39B86F13D169</Id>
    <!--Version. Updates from the store only get triggered if there is a version change. -->
    <Version>1.0.0.0</Version>
    <ProviderName>Office Developer Education Team.</ProviderName>
    <DefaultLocale>en-US</DefaultLocale>
    <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
    <DisplayName DefaultValue="Contoso Data Importer" />
    <Description DefaultValue="Get started with extracting your data. Add in a dataset to your workbook."/>
    <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
    <IconUrl DefaultValue="https://localhost:8060/assests/icon-32.png" />
    <HighResolutionIconUrl DefaultValue="https://localhost:8060/assests/icon-32.png"/>
    <!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
    <!--<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]">-->
    <!-- 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. -->
    <!-- <SupportUrl DefaultValue="https://www.contoso.com/help"/> -->
    <AppDomains>
        <AppDomain>https://localhost:8060</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="SharedRuntime" MinVersion="1.1"/>
        </Sets>
    </Requirements>
    <DefaultSettings>
        <SourceLocation DefaultValue="https://localhost:8060/#/index.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">
        <!-- The Hosts node is required. -->
        <Hosts>
            <!-- Each host can have a different set of commands. -->
            <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
            <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
            <Host xsi:type="Workbook">
                <Runtimes>
                    <Runtime resid="ContosoAddin.Url" lifetime="long" />
                </Runtimes>
                <AllFormFactors>
                    <ExtensionPoint xsi:type="CustomFunctions">
                        <Script>
                            <SourceLocation resid="ContosoAddin.Url"/>
                        </Script>
                        <Page>
                            <SourceLocation resid="ContosoAddin.Url"/>
                        </Page>
                        <Metadata>
                            <SourceLocation resid="ContosoAddin.Url"/>
                        </Metadata>
                        <Namespace resid="Functions.Namespace"/>
                    </ExtensionPoint>
                </AllFormFactors>
                <!-- Form factor. Currently only DesktopFormFactor is supported. -->
                <DesktopFormFactor>
                    <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
                    <GetStarted>
                        <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
                        <Title resid="GetStarted.Title"/>
                        <!-- Description of the Getting Started callout. resid points to a LongString resource -->
                        <Description resid="GetStarted.Description"/>
                        <!-- Point to a url resource which details how the add-in should be used. -->
                        <LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
                    </GetStarted>
                    <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
            Think of the FunctionFile as the code behind ExecuteFunction. -->
                    <FunctionFile resid="ContosoAddin.Url" />
                    <!-- PrimaryCommandSurface is the main Office Ribbon. -->
                    <ExtensionPoint xsi:type="PrimaryCommandSurface">
                        <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
                        <CustomTab id="ShareTime">
                            <Group id="LoginGroup">
                                <Label resid="LoginGroup.Label"/>
                                <Icon>
                                    <bt:Image size="16" resid="LGButton.Icon"/>
                                    <bt:Image size="32" resid="LGButton.Icon"/>
                                    <bt:Image size="80" resid="LGButton.Icon"/>
                                </Icon>
                                <Control xsi:type="Button" id="BtnLoginService">
                                    <Label resid="BtnLoginService.Label" />
                                    <Supertip>
                                        <!-- ToolTip title. resid must point to a ShortString resource. -->
                                        <Title resid="BtnLoginService.Label" />
                                        <!-- ToolTip description. resid must point to a LongString resource. -->
                                        <Description resid="BtnLoginService.Tooltip" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="LGButton.Icon"/>
                                        <bt:Image size="32" resid="LGButton.Icon"/>
                                        <bt:Image size="80" resid="LGButton.Icon"/>
                                    </Icon>
                                    <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
                                    <Action xsi:type="ExecuteFunction">
                                        <FunctionName>btnloginservice</FunctionName>
                                    </Action> 
                                </Control>
                                <Control xsi:type="Button" id="BtnLogoutService">
                                    <Label resid="BtnLogoutService.Label" />
                                    <Supertip>
                                        <!-- ToolTip title. resid must point to a ShortString resource. -->
                                        <Title resid="BtnLogoutService.Label" />
                                        <!-- ToolTip description. resid must point to a LongString resource. -->
                                        <Description resid="BtnLogoutService.Tooltip" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="SignOutButton.Icon"/>
                                        <bt:Image size="32" resid="SignOutButton.Icon"/>
                                        <bt:Image size="80" resid="SignOutButton.Icon"/>
                                    </Icon>
                                    <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
                                    <Action xsi:type="ExecuteFunction">
                                        <FunctionName>btnlogoutservice</FunctionName>
                                    </Action>
                                    <Enabled>false</Enabled>
                                </Control>
                            </Group>
                            <Label resid="CommandsGroup.Label"/>
                        </CustomTab>
                    </ExtensionPoint>
                </DesktopFormFactor>
            </Host>
        </Hosts>
        <!-- You can use resources across hosts and form factors. -->
        <Resources>
            <bt:Images>             
                <bt:Image id="LGButton.Icon" DefaultValue="https://localhost:8060/assests/log_in.png" />
                <bt:Image id="SignOutButton.Icon" DefaultValue="https://localhost:8060/assests/log_out.png" />
            </bt:Images>
            <bt:Urls>       
                <bt:Url id="ContosoAddin.Url" DefaultValue="https://localhost:8060/#/index.html"/>
                <bt:Url id="LGButton.Url" DefaultValue="https://localhost:8060/#/login" />
                <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
            </bt:Urls>
            <!-- ShortStrings max characters==125. -->
            <bt:ShortStrings>       
                <bt:String id="GetStarted.Title" DefaultValue="Contoso Data Importer add-in has loaded successfully." />
                <bt:String id="Functions.Namespace" DefaultValue="CONTOSO"/>
                <bt:String id="BtnLoginService.Label" DefaultValue="Sign in"/>
                <bt:String id="BtnLogoutService.Label" DefaultValue="Sign out"/>
                <bt:String id='StartupGroup.Label' DefaultValue='Contoso Data Importer Services'/>
                <bt:String id='LoginGroup.Label' DefaultValue='Authentication'/>
                <bt:String id='FeedbackGroup.Label' DefaultValue='Let us know'/>
                <bt:String id="CommandsGroup.Label" DefaultValue="CONTOSO DATA"/>
            </bt:ShortStrings>
            <!-- LongStrings max characters==250. -->
            <bt:LongStrings>
                <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Get files stored on OneDrive" />
                <bt:String id="GetStarted.Description" DefaultValue="Get going by opening CONTOSO importer TAB on the Ribbon." />
                <bt:String id="BtnLoginService.Tooltip" DefaultValue="Please sign in "/>
                <bt:String id="BtnLogoutService.Tooltip" DefaultValue="Please sign out"/>
            </bt:LongStrings>
        </Resources>
    </VersionOverrides>
    <!-- End Add-in Commands Mode integration. -->
</OfficeApp>

By commenting below tag from manifest file that manifest upload error is resolved.通过在清单文件中评论下面的标签来解决清单上传错误。

<!-- <AllFormFactors>
                <ExtensionPoint xsi:type="CustomFunctions">
                    <Script>
                        <SourceLocation resid="ContosoAddin.Url"/>
                    </Script>
                    <Page>
                        <SourceLocation resid="ContosoAddin.Url"/>
                    </Page>
                    <Metadata>
                        <SourceLocation resid="ContosoAddin.Url"/>
                    </Metadata>
                    <Namespace resid="Functions.Namespace"/>
                </ExtensionPoint>
            </AllFormFactors> -->

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM