Excel如何在选项卡制作自己的工具箱?
1、新建两个文件夹,分别命名为“_rels”与“customUI”。
2、新建文本文档复制以下代码:
<?xml version="1.0" encoding="utf-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" Id="rId3" /><Relationship Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" Id="rId2" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" Id="rId1" /><Relationship Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="/customUI/customUI.xml" Id="Rb73060d9a5464036" /></Relationships>
粘贴进去后选择另存为,设置,文件名为“.rels”编码为“utf-8”,另存在“_rels”文件夹中。
3、新建文本文档复制以下代码:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="Tab1" label="东来东往选项卡">
<group id="Group1" label="功能区介绍">
<button id="Button1" label="命令1" imageMso="HappyFace" size="large" onAction="自定义宏_Click"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
粘贴进去后选择另存为,设置,文件名为“customUI.xml”编码为“utf-8”,另存在“customUI”文件夹中。
4、新建excel工作簿,重命名把后缀“测试.xlsx”改为“测试.rar”。
5、打开“测试.rar”文件(请勿解压)。
6、分别把“_rels”与“customUI”两个文件夹拖拽到“测试.rar”然后确认。
7、把文件后缀名改回“测试.xlsx”。
8、现在打开“测试.xlsx”会发现文件中已经新增了自己想要的选项卡和功能区。
这样我们自己制作的个性化工具箱就制作完成了。