2016-10-19 3 views
0

여기 매니페스트의 호스트오피스 추가 기능 버튼의 아이콘이

<ExtensionPoint xsi:type="PrimaryCommandSurface"> 
    <CustomTab id="MyTab"> 
     <Group id="Raporty.GroupPabcd"> 
      <Label resid="Raporty.GroupPabcd.Label" /> 
      <Icon> 
       <bt:Image resid="Raporty.Icon1_16" size="16" /> 
       <bt:Image resid="Raporty.Icon1_20" size="20" /> 
       <bt:Image resid="Raporty.Icon1_24" size="24" /> 
       <bt:Image resid="Raporty.Icon1_32" size="32" /> 
       <bt:Image resid="Raporty.Icon1_40" size="40" /> 
       <bt:Image resid="Raporty.Icon1_48" size="48" /> 
       <bt:Image resid="Raporty.Icon1_64" size="64" /> 
       <bt:Image resid="Raporty.Icon1_80" size="80" /> 
      </Icon> 

      <Control xsi:type="Button" id="RaportPabcd.Button"> 
       <Label resid="RaportPabcd.Button.Label" /> 
       <Supertip> 
        <Title resid="RaportPabcd.Button.Label" /> 
        <Description resid="RaportPabcd.Button.Tooltip" /> 
       </Supertip> 
       <Icon> 
        <bt:Image resid="Raporty.Icon1_16" size="16" /> 
        <bt:Image resid="Raporty.Icon1_20" size="20" /> 
        <bt:Image resid="Raporty.Icon1_24" size="24" /> 
        <bt:Image resid="Raporty.Icon1_32" size="32" /> 
        <bt:Image resid="Raporty.Icon1_40" size="40" /> 
        <bt:Image resid="Raporty.Icon1_48" size="48" /> 
        <bt:Image resid="Raporty.Icon1_64" size="64" /> 
        <bt:Image resid="Raporty.Icon1_80" size="80" /> 
       </Icon> 

       <Action xsi:type="ShowTaskpane"> 
        <TaskpaneId>ButtonId1</TaskpaneId> 
        <SourceLocation resid="Contoso.Taskpane.Url" /> 
       </Action> 
      </Control> 

     </Group> 
     <Label resid="Raporty.Tab.Label" /> 
    </CustomTab> 
</ExtensionPoint> 

뿐만 아니라

<Resources> 
    <bt:Images> 
     <bt:Image id="Raporty.Icon1_16" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_16.png" /> 
     <bt:Image id="Raporty.Icon1_20" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_20.png" /> 
     <bt:Image id="Raporty.Icon1_24" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_24.png" /> 
     <bt:Image id="Raporty.Icon1_32" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_32.png" /> 
     <bt:Image id="Raporty.Icon1_40" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_40.png" /> 
     <bt:Image id="Raporty.Icon1_48" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_48.png" /> 
     <bt:Image id="Raporty.Icon1_64" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_64.png" /> 
     <bt:Image id="Raporty.Icon1_80" DefaultValue="~remoteAppUrl/Images/ReportIcons/report_1_80.png" /> 
    </bt:Images> 
</Resources> 

문제는 자원에서 추출의 표시되지 않습니다 enter image description here

브라우저에서 직접 이미지에 액세스하려고했습니다 (예 : http://localhost/ExcelWebWeb/Images/ReportIcons/report_1_32.png) 위로 표시됩니다.

IIS 로그를보고 Excel 응용 프로그램에서 이미지를 쿼리했는지 확인했습니다. addin은 단추의 이미지를 쿼리하지 않고 TaskPane의 html/js 파일 만 쿼리하는 반면 내 로컬 브라우저에서 아이콘으로 액세스 로그를 볼 수 있습니다.

+0

확인하는 경우 이미지의 빌드 작업 properties가 Content로 설정됩니다. –

답변

0

'~ remoteAppUrl'을 localhost : [port number]로 바꾸어보세요. 앱을 게시 할 때 호스트 및 포트 번호로 변경해야합니다.

-1
<CustomTab id="MyTab"> 
     <Group id="Raporty.MyTab.GroupPabcd"> 
      <Label resid="Raporty.MyTab.GroupPabcd.Label" /> 
...... 

      <Label resid="Raporty.MyTab.TabLabel" /> 

이는 매니페스트의 핵심 코드입니다.

+2

코드를 게시하지 마십시오. 또한 코드가하는 일에 대한 설명을 제공하십시오. –

0

동일한 문제가 있었지만 해결책을 찾았습니다. 하여 manifest.xml 파일에 다음을 추가하십시오 :

이미지에 대한
<Version>1.0.0.0</Version> 
<ProviderName>abc</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="abc" /> 
<IconUrl DefaultValue="~remoteAppUrl/Images/add-in-icon-lo-res.png"/> 
<HighResolutionIconUrl DefaultValue="~remoteAppUrl/Images/add-in-icon-hi-res.png"/> 

해상도 Iconurls 64 X 64 개 PNG 8 비트 깊이 픽셀에 대한 HighResolutionIconUrl 128 X 128 픽셀이어야합니다을