首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Excel:自定义条带模板(XLSTART)

Excel:自定义条带模板(XLSTART)
EN

Stack Overflow用户
提问于 2019-04-17 10:55:34
回答 2查看 443关注 0票数 0

我已经为带有单个组和一个按钮的Excel 带状创建了一个自定义选项卡。这是保存为XLSM文件的,当打开它时,它的工作原理是假设的。

每当打开excel文档时,我希望这个自定义选项卡在中出现,。XLSM文件保存在XLSTART文件夹中,并在打开excel文档时启动。问题是打开了2个文档,XLSM带有自定义选项卡,单击的文件仅使用标准条带。

我想这是正常的,因为它被认为是一个单独的文件,而不是一个模板;但是,如果该文件被保存为模板(测试了XLTX和),Excel根本不会读取它。

  • 双击模板确实会打开它(问题是要使它自动启动)
  • 只有当XLSTART中的文档是模板时才会出现问题
  • 模板中的引用是用正确的语言编写的。
  • 已经在不同的机器上测试过了
  • 我正在使用Excel 2016 (32位)

其想法是向每个需要自定义选项卡中的工具的用户提供此模板,而不必创建安装可执行文件(在我们的环境中被阻塞),并让它使用excel自动启动。

你有没有遇到过这个问题,或者知道一些我可能错过的事情?

CustomUi14.xml

代码语言:javascript
复制
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onL`oad="OnRibbonLoad">
  <ribbon>
    <tabs>
      <tab id="tab0" label="NUEVOVI Tools">
        <group id="grp0" autoScale="true" centerVertically="false" label="Any365 Reports" getVisible ="GetVisible" tag = "RibbonName:=;inMenu:=;CustomTagValue1:=;CustomTagValue2:=;CustomTagValue3:=;CustomPicture:=;CustomPicturePath:=" >
          <button idMso="ChartInsert" showLabel="true" size="large" label="Generate" tag="RibbonName:=;inMenu:=;CustomTagValue1:=;CustomTagValue2:=;CustomTagValue3:=;CustomPicture:=;CustomPicturePath:=" onAction="generateReport" getVisible="GetVisible" getEnabled="GetEnabled" />
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

.rels文件

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="R7f19f805bfb641b9" Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility"    Target="customUI/customUi14.xml"/><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>

文件:id=76809226544239420467

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-04-18 13:56:26

通过将文件保存为XLAM解决了这个问题。让它完美地运转起来。由于某些原因(我不知道),模板文件不会从XLSTART forlder加载。

票数 1
EN

Stack Overflow用户

发布于 2019-04-17 11:14:51

配置Excel

试试这个

代码语言:javascript
复制
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="OnRibbonLoad">
  <ribbon startFromScratch="false">
    <tabs>
      <tab id="tab0" label="NUEVOVI Tools" insertBeforeMso = "TabHome" keytip = "G">
        <group id="grp0" autoScale="true" centerVertically="false" label="Any365 Reports" getVisible ="GetVisible" tag = "RibbonName:=;inMenu:=;CustomTagValue1:=;CustomTagValue2:=;CustomTagValue3:=;CustomPicture:=;CustomPicturePath:=" >
          <button idMso="ChartInsert" showLabel="true" size="large" label="Generate" tag="RibbonName:=;inMenu:=;CustomTagValue1:=;CustomTagValue2:=;CustomTagValue3:=;CustomPicture:=;CustomPicturePath:=" onAction="generateReport" getVisible="GetVisible" getEnabled="GetEnabled" />
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

在一些有很多安全限制的网络上,您可能无法访问XLSTART目录,或者您可能没有保存文件的权限。相反,在您自己的系统上使用您想要的任何名称创建一个启动目录,并将book.xltx文件存储在这个新的备用启动目录中。您选择的目录名并不重要,但您需要告诉Excel它在哪里。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55725930

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档