我已经为带有单个组和一个按钮的Excel 带状创建了一个自定义选项卡。这是保存为XLSM文件的,当打开它时,它的工作原理是假设的。
每当打开excel文档时,我希望这个自定义选项卡在中出现,。XLSM文件保存在XLSTART文件夹中,并在打开excel文档时启动。问题是打开了2个文档,XLSM带有自定义选项卡,单击的文件仅使用标准条带。
我想这是正常的,因为它被认为是一个单独的文件,而不是一个模板;但是,如果该文件被保存为模板(测试了XLTX和),Excel根本不会读取它。
其想法是向每个需要自定义选项卡中的工具的用户提供此模板,而不必创建安装可执行文件(在我们的环境中被阻塞),并让它使用excel自动启动。
你有没有遇到过这个问题,或者知道一些我可能错过的事情?
CustomUi14.xml
<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文件
<?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
发布于 2019-04-18 13:56:26
通过将文件保存为XLAM解决了这个问题。让它完美地运转起来。由于某些原因(我不知道),模板文件不会从XLSTART forlder加载。
发布于 2019-04-17 11:14:51
配置Excel
试试这个
<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它在哪里。
https://stackoverflow.com/questions/55725930
复制相似问题