Надстройка Manifest. xml file Разработка с использованием настраиваемой вкладки с группами не работает в Desktop Excel 365, но работает в Online Office 365 - PullRequest
1 голос
/ 05 мая 2020

Мы разработали Манифест надстройки. xml файл для специальной вкладки с группами. Ниже приведены ссылки на его разработку. https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/customtab#customtab -пример https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/group

Разработка Манифест. xml файл работает нормально в Office Online 365 но когда мы импортируем то же самое в Desktop Excel 365 , он не работает.

            <!--Control. It can be of type "Button" or "Menu" -->
            <Control xsi:type="Button" id="Contoso.FunctionButton">
            <!--Label for your button. resid must point to a ShortString resource -->
              <Label resid="Contoso.FunctionButton.Label" />
              <Tooltip resid="Contoso.FunctionButton.Tooltip"/>
              <Supertip>
                 <!--ToolTip title. resid must point to a ShortString resource -->
                <Title resid="Contoso.FunctionButton.Label" />
                 <!--ToolTip description. resid must point to a LongString resource -->
                <Description resid="Contoso.FunctionButton.Tooltip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.FunctionButton.Icon" />
                <bt:Image size="32" resid="Contoso.FunctionButton.Icon" />
                <bt:Image size="80" resid="Contoso.FunctionButton.Icon" />
              </Icon>
              <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
              <!--Look at the FunctionFile.html page for reference on how to implement the function -->
              <Action xsi:type="ShowTaskpane">
              <!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
              <TaskpaneId>ButtonId1</TaskpaneId>
                <SourceLocation resid="Contoso.FunctionButton.Url" />
              </Action>
            </Control>

            <Control xsi:type="Button" id="Contoso.TaskpaneButton">
              <Label resid="Contoso.TaskpaneButton.Label" />
              <Tooltip resid="Contoso.TaskpaneButton.Tooltip" />
              <Supertip>
                <Title resid="Contoso.TaskpaneButton.Label" />
                <Description resid="Contoso.TaskpaneButton.Tooltip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon" />
                <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon" />
                <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <TaskpaneId>Button2Id1</TaskpaneId>
                 <!--Provide a url resource id for the location that will be displayed on the task pane -->
                <SourceLocation resid="Contoso.Taskpane1.Url" />
              </Action>
            </Control>
        <!-- Menu example -->


          </Group>
          <Group id="Contoso.Tab1.Group2">
             <!--Label for your group. resid must point to a ShortString resource -->
            <Label resid="Contoso.Tab1.GroupLabel" />
            <Icon>
            <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
            <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
            <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
              <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon" />
              <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon" />
              <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon" />
            </Icon>

            <!--Control. It can be of type "Button" or "Menu" -->
            <Control xsi:type="Button" id="Contoso.FunctionButton">
            <!--Label for your button. resid must point to a ShortString resource -->
              <Label resid="Contoso.FunctionButton.Label" />
              <Tooltip resid="Contoso.FunctionButton.Tooltip"/>
              <Supertip>
                 <!--ToolTip title. resid must point to a ShortString resource -->
                <Title resid="Contoso.FunctionButton.Label" />
                 <!--ToolTip description. resid must point to a LongString resource -->
                <Description resid="Contoso.FunctionButton.Tooltip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.FunctionButton.Icon" />
                <bt:Image size="32" resid="Contoso.FunctionButton.Icon" />
                <bt:Image size="80" resid="Contoso.FunctionButton.Icon" />
              </Icon>
              <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
              <!--Look at the FunctionFile.html page for reference on how to implement the function -->
              <Action xsi:type="ShowTaskpane">
              <!--Name of the function to call. This function needs to exist in the global DOM namespace of the function file-->
              <TaskpaneId>ButtonId1</TaskpaneId>
                <SourceLocation resid="Contoso.FunctionButton.Url" />
              </Action>
            </Control>

            <Control xsi:type="Button" id="Contoso.TaskpaneButton">
              <Label resid="Contoso.TaskpaneButton.Label" />
              <Tooltip resid="Contoso.TaskpaneButton.Tooltip" />
              <Supertip>
                <Title resid="Contoso.TaskpaneButton.Label" />
                <Description resid="Contoso.TaskpaneButton.Tooltip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon" />
                <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon" />
                <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <TaskpaneId>Button2Id1</TaskpaneId>
                 <!--Provide a url resource id for the location that will be displayed on the task pane -->
                <SourceLocation resid="Contoso.Taskpane1.Url" />
              </Action>
            </Control>
        <!-- Menu example -->


          </Group>

          <!-- Label of your tab -->
          <!-- If validating with XSD it needs to be at the end, we might change this before release -->
          <Label resid="Contoso.Tab1.TabLabel" />
        </CustomTab>
      </ExtensionPoint>

Пожалуйста, помогите нам решить эту проблему.

1 Ответ

1 голос
/ 19 мая 2020

На основе:

Я рискну предположить, что проблема заключается в том, что вы видите соответствующий пункт в меню в Office Online, но не видите его в настольной версии. Если это так, вы можете попробовать следующие шаги:

  • удалить пробел в атрибуте id CustomTab: <CustomTab id="ContosoTab">

Также вы можете проверить манифест ScriptLab. Это хороший пример рабочего манифеста. https://github.com/OfficeDev/script-lab/tree/master/manifests

...