Harsh Patel
Harsh Patel

Reputation: 151

Is it possible to create a Ribbon Tab in Office.js?

I am trying to create my own Tab in OfficeJS for the Windows Excel. I created a test application using Yeoman generator and have tried using CustomTab along with the Label but nothing is showing up on the ribbon. I am not sure if I am understanding the use of CustomTab correctly. Here is my XML

          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <CustomTab id="Tab.Home">
              <Group id="CommandsGroup">
                <Label resid="Tab.Label"/>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16"/>
                  <bt:Image size="32" resid="Icon.32x32"/>
                  <bt:Image size="80" resid="Icon.80x80"/>
                </Icon>
                <Control xsi:type="Button" id="TaskpaneButton">
                  <Label resid="TaskpaneButton.Label"/>
                  <Supertip>
                    <Title resid="TaskpaneButton.Label"/>
                    <Description resid="TaskpaneButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>ButtonId1</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </CustomTab>
          </ExtensionPoint>

Upvotes: 0

Views: 490

Answers (1)

Raymond Lu
Raymond Lu

Reputation: 2236

From this XML, You are referencing Tab.Home, So your application ribbon is on Home tab

    <CustomTab id="Tab.Home">

if you want to create a new ribbon tab, you could change this line:

    <CustomTab id="NewRibbonTab.Tab1">

Upvotes: 2

Related Questions