如何为 excel 制作加载项 manifest.xml?

问题描述

我是 Excel 编程的新手。 我需要制作类似 this 的东西(导航栏上的新标签和几个按钮)。

主要问题是如何创建一个新选项卡(如图片上的 FWO-Office-Addins)。感谢帮助!

解决方法

您对带有自定义功能区选项卡的加载项命令感兴趣。例如,以下示例展示了如何使用具有 ExtensionPoint 属性值的 PrimaryCommandSurface 元素,以及应该与每个元素一起使用的子元素:

<ExtensionPoint xsi:type="PrimaryCommandSurface">
  <CustomTab id="Contoso Tab">
  <!-- If you want to use a default tab that comes with Office,remove the above CustomTab element,and then uncomment the following OfficeTab element -->
  <!-- <OfficeTab id="TabData"> -->
    <Label resid="residLabel4" />
    <Group id="Group1Id12">
      <Label resid="residLabel4" />
      <Icon>
        <bt:Image size="16" resid="icon1_32x32" />
        <bt:Image size="32" resid="icon1_32x32" />
        <bt:Image size="80" resid="icon1_32x32" />
      </Icon>
      <Tooltip resid="residToolTip" />
      <Control xsi:type="Button" id="Button1Id1">

        <!-- information about the control -->
      </Control>
      <!-- other controls,as needed -->
    </Group>
  </CustomTab>
</ExtensionPoint>

Add-in commands for Excel,PowerPoint,and Word 文章中阅读更多相关信息。