2016-08-04 9 views
0

Excel 2016タスクパネルのアドインが作成されており、オンラインとデスクトップの両方で問題なく機能しました。ほとんどofficial command addin exampleに基づいていますExcel 2016コマンドアドインはExcelオンラインでのみ正常に動作します

<?xml version="1.0" encoding="UTF-8"?> 
<!--Created:325c27b6-9566-4641-a1c6-175f0039f620--> 
<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" 
> 
    <!--BasicSettings--> 
    <Id>bcb30953-453a-4cbb-93c3-f3d289de0ee3</Id> 
    <Version>1.1.5.6</Version> 
    <ProviderName>My Corporation</ProviderName> 
    <DefaultLocale>en-US</DefaultLocale> 
    <DisplayName DefaultValue="MyAddin" /> 
    <Description DefaultValue="My addin's description"/> 
    <IconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" /> 
    <HighResolutionIconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" /> 
    <SupportUrl DefaultValue="https://google.com" /> 
    <!-- http://dev.office.com/reference/add-ins/office-add-in-requirement-sets --> 
    <Permissions>ReadWriteDocument</Permissions> 
    <!--EndBasicSettings--> 



    <!--BeginTaskpaneMode--> 
    <Hosts> 
    <Host Name="Workbook" /> 
    </Hosts> 
    <DefaultSettings> 
    <SourceLocation DefaultValue="https://odsample.azurewebsites.net/Pages/Home.aspx" /> 
    </DefaultSettings> 
    <!--EndTaskpaneMode--> 



    <!--BeginAddinCommandsMode--> 
    <!-- https://github.com/OfficeDev/Office-Add-in-Commands-Samples/blob/master/Tools/XSD/TaskPaneAppVersionOverridesV1_0.xsd --> 
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0"> 
    <Description resid="MyAddin.Description" /> 
    <Hosts> 
     <Host xsi:type="Workbook"> 
     <DesktopFormFactor> 
      <GetStarted> 
      <Title resid="MyAddin.Title"/>     
      <Description resid="MyAddin.Description"/>    
      <LearnMoreUrl resid="MyAddin.LearnMore"/> 
      </GetStarted> 
      <FunctionFile resid="MyAddin.FunctionFile" /> 
      <ExtensionPoint xsi:type="PrimaryCommandSurface"> 
      <CustomTab id="MyAddin" > 
       <Group id="MyAddin.Tab1.Group1"> 
       <Label resid="MyAddin.Tab1.Group1.Label" /> 
       <Icon> 
        <bt:Image size="16" resid="MyAddin.Tab1.Group1.Icon.16" /> 
        <bt:Image size="32" resid="MyAddin.Tab1.Group1.Icon.32" /> 
        <bt:Image size="80" resid="MyAddin.Tab1.Group1.Icon.80" /> 
       </Icon> 
       <Control xsi:type="Button" id="MyAddin.Tab1.Group1.RunFunctionButton"> 
        <Label resid="MyAddin.Tab1.Group1.RunFunctionButton.Label" /> 
        <Supertip> 
        <Title resid="MyAddin.Tab1.Group1.RunFunctionButton.Title" /> 
        <Description resid="MyAddin.Tab1.Group1.RunFunctionButton.Description" /> 
        </Supertip> 
        <Icon> 
        <bt:Image size="16" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.16" /> 
        <bt:Image size="32" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.32" /> 
        <bt:Image size="80" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.80" /> 
        </Icon> 
        <Action xsi:type="ExecuteFunction"> 
        <FunctionName>writeText</FunctionName> 
        </Action> 
       </Control> 
       </Group> 
       <Label resid="MyAddin.Tab1.Label"/><!-- order is important--> 
      </CustomTab> 
      </ExtensionPoint> 
     </DesktopFormFactor> 
     </Host> 
    </Hosts> 
    <Resources> 
     <bt:Images> 
     <bt:Image id="MyAddin.Tab1.Group1.Icon.16" DefaultValue="https://i.imgur.com/FkSShX9.png" /> 
     <bt:Image id="MyAddin.Tab1.Group1.Icon.32" DefaultValue="https://i.imgur.com/FkSShX9.png" /> 
     <bt:Image id="MyAddin.Tab1.Group1.Icon.80" DefaultValue="https://i.imgur.com/FkSShX9.png" /> 
     <bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.16" DefaultValue="https://i.imgur.com/qDujiX0.png" /> 
     <bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.32" DefaultValue="https://i.imgur.com/qDujiX0.png" /> 
     <bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.80" DefaultValue="https://i.imgur.com/qDujiX0.png" /> 
     </bt:Images> 
     <bt:Urls> 
     <bt:Url id="MyAddin.LearnMore" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" /> 
     <bt:Url id="MyAddin.FunctionFile" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" /> 
     </bt:Urls> 
     <bt:ShortStrings> 
     <bt:String id="MyAddin.Title" DefaultValue="MyAddin" /> 
     <bt:String id="MyAddin.Tab1.Label" DefaultValue="MyAddin" /> 
     <bt:String id="MyAddin.Tab1.Group1.Label" DefaultValue="Execute Function" /> 
     <bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Label" DefaultValue="Execute Function" /> 
     <bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Title" DefaultValue="Execute Function" /> 
     </bt:ShortStrings> 
     <bt:LongStrings> 
     <bt:String id="MyAddin.Description" DefaultValue="MyAddin's description" /> 
     <bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Description" DefaultValue="Click to Execute Function" /> 
     </bt:LongStrings> 
    </Resources> 
    </VersionOverrides> 
    <!--EndAddinCommandsMode--> 
</OfficeApp> 

、:しかし、今私がアドインコマンドに変換しようとしていることを、私はこのmanifestに関しては本当に奇妙な展開問題accrossつまずいてきました。このマニフェストは、テストのためにExcel Onlineに完全にインポートすることができ、リボンに予想されるコマンドグループを表示します。ただし、 'Insert' => 'My Addins' => 'Shared folder'(テスト目的のマニフェストを格納する場所)をクリックしても、アドインは表示されないため、Excelのデスクトップ版ではインポートできません。私の現在の理解は何らかの種類の検証の失敗によるものです。

長時間の試行錯誤の末、私はxml名前空間とスキーマ定義が非難されていると確信しています。しかし、私はまだ苦労しています。

私は(余分な末尾/1.0に注意してください)<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"><VersionOverrides>を変更した場合、その後、私は両方のオンラインおよびデスクトップ上のマニフェストを展開できることを確認しますが、私の知る限り理解してタスクペインバージョン(にそれらの両方フォールバックしています<VersionOverrides>一部の事実によるものであるため奇形のomitedされている。

問題が未完了であること、名前空間の宣言の上に横たわっていた同様のquestionでは、受け入れ答えは( `余分/1.0) andの点に注意してください。<OfficeApp xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0>を使用するために選びました。この構成を使用すると、アドインが期待どおりオンライン(コマンドアドイン)で動作するようになりますが、desktにもロードできませんop。

同様に、これはバージョンの問題ではないと確信しています。これは、理論的に要件を満たすVersion: 16.0.7070.2033を実行しているため、このquestionは適用されません。

私が言ったように、私は本当にこの問題を解決する方法を考えるのに苦労しています。だから、どんな助けも完全に感謝されます(私はとても疲れているので、明らかに何かが分かりません)。ありがとう

+0

サンプルはDesktop Excelで正しく機能しますか? –

+0

私はちょうど言及されたサンプルと幸運を使用してチェックしました。デスクトップバージョンには表示されず、さらに奇妙なことに、Office Onlineのバージョンの非互換性に関するメッセージが表示されます。 Btw、私はまた、別の教職員のPCで私のマニフェストをテストしたが、どちらもうまくいきません。 – pekebuda

+0

私もテストしましたが、[これ](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/blob/master/Excel/Manifest/ExcelAddinWithCommandsOnDataTab.xml)その他の公式サンプルアドインの動作オンラインとオフラインの両方で、リボンのコントロールを期待どおりに表示します。本当に今困惑している: - /。 – pekebuda

答えて

1

使用できるid属性の長さに制限があるようです。 32文字の文字列に固執すると、私にとって問題が解決しました。

関連する問題