2

office.js と react-fabric UI を使用して Excel アドインを作成しました。マニフェストを作成し、次のコマンドを使用して検証しました: npx --ignore-existing office-addin-manifest validate 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>
4

1 に答える 1