Excel 2010 - 在工作簿中存储功能区自定义
我是 Excel 功能区自定义新手。将功能区自定义存储在工作簿中的最直接的方法是什么,以便在工作簿关闭时自定义消失得无影无踪?
I'm new to Excel ribbon customization. What is the most straight forward way to store ribbon customization inside a workbook, so that when the workbook is closed the customization disappears without a trace?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要更改工作簿的功能区,您需要更改 xlsx 文件“内部”的 XML 文件(只不过是 .zip)。
一切都在这里得到了很好的解释:http://www.rondebruin.nl/ribbon.htm
请如果这不能回答您的问题,请告诉我们。
To change the ribbon with a workbook, you need to change the XML file "inside" the xlsx file (which is nothing more but a .zip).
Everything is very well explained here: http://www.rondebruin.nl/ribbon.htm
Please let us know if that does not answer your question.
最直接的方法是右键单击功能区并单击选择自定义功能区,然后查看打开的框的右下角,选择重置,然后确认。
附注
您还可以通过回收旧的 Excel 工具栏在 Excel 中创建CustomUI Ribbons!
我一定读过 500 页有关定制的内容,但从未在任何地方见过下面的黄金。
此方法还允许您添加未链接到或嵌入工作簿中的自定义 UI 功能区。
:-)
未记录的功能如下:
只需在 Excel Pro 2010 中打开 Excel 2007 中的旧 excel12.xlb,就会出现一个闪亮的新功能区选项卡。我之前还从旧的 2003 Excel(X?).xlb 在 excel 2007 中创建了这些文件,如果没记错的话,我一直在使用 Excel5 中的这些文件。
它未链接到 xls,因此即使没有打开工作表也可以查看。 (不仅是隐藏,而且实际上在 VBIDE 中没有打开或可见。)加载项列表中也没有任何内容。
我使用 Excel 实用程序导出了此自定义设置。
这样做的好处在于,它使编辑宏路径等变得非常容易,因为我可以通过在记事本中打开 Excel Customizations.exportedUI 来编辑名称。
使用该实用程序导入回 Excel。
里面的代码可以用作使用 rels 等的标准自定义的一部分。因此,如果您想将其添加到工作簿中,请直接进行,只有我在我的代码中放置了很多通用实用程序。
以下是我的屏幕的一些片段以供备份:
(点击查看完整图片)
The most straightforward way is to right-click on the ribbon & choose customise ribbon, then look on the lower right of the box that opens, choose reset and then confirm.
PS
You can also create CustomUI Ribbons in excel by recycling your old excel toolbars!
I must have read 500 pages on customisation and never seen the below gold anywhere.
This method also lets you add a customUI Ribbon NOT LINKED TO or embedded in a workbook.
:-)
Undocumented feature follows:
Just open an old excel12.xlb from Excel 2007 in Excel Pro 2010 and a shiny new ribbon tab will appear. I have also previously created these in excel 2007 from an old 2003 Excel(X?).xlb which I have been using all the way from Excel5 if memory serves correctly.
It was not linked to an xls, so it was viewable even if no sheets were open. (Not just hidden, but actually none open or viewable in VBIDE.) Nothing in the add-ins list either.
I exported this customisation using Excel's utility.
The beauty of this is it makes it very easy to edit the macro paths etc, as I was able to edit the names by opening the Excel Customizations.exportedUI in Notepad.
Imported back into Excel using the utility.
The code inside can be used as part of a standard customisation using rels etc. So if you want to add it to a workbook go right ahead, only I put a lot of general utilities in mine.
Here are some snips of my screen to back it up:
(click for full image)