Excel加载项|清单加载时在桌面EXCEL上显示错误 [英] excel add ins | on manifest loading showing error on desktop excel

查看:42
本文介绍了Excel加载项|清单加载时在桌面EXCEL上显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用office.js和Reaction-Fabric UI创建了Excel外接程序。我已经创建了清单,并使用以下命令进行了验证:npx--Ignore-Existing office-addin-MANIFEST验证清单.xml 而且看起来不错,没有问题。当我上传桌面EXCEL中的清单时,它在EXCEL上显示以下错误。虽然它没有阻止任何插件功能,但它给用户留下了错误的印象。PFA错误SS:";加载加载项时出错

单击功能区按钮时,其工作正常,但在Excel底部显示清单加载错误。

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>

推荐答案

通过在清单文件中的标记下面注释,清单上载错误已解决。

<!-- <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> -->

这篇关于Excel加载项|清单加载时在桌面EXCEL上显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆