Tuesday, November 25, 2008

Modifying Excel 2007 Ribbon Component

For those Excel users who do not have an idea what an Excel Ribbon is, then i think a simple picture will help


This example show you sample ribbons (shortcuts for Excel), under the Home tab you will notice a Clipboard ribbon, Font ribbon, Alignment Ribbon, etc. To modify this you need to download "Office 2007 Custom UI Editor" available in
http://openxmldeveloper.org/articles/customUIeditor.aspx. Install this mini application and open your excel file using this editor.


Type the following xml file and then save.

The first part of the xml hides the current Clipboart ribbon of Excel as shown by idmso="GroupClipboard" visible="false". The next part simply imitates the Group Clipboard, as i named it as Virtify Clipboard showing only the Copy and PasteValues part of the ribbon. I intentionally did not include the "Cut" and other Paste functionalities since i want to limit the user of my file to do this.

But note that additional items must be done to limit the user since he/she can use cut/paste functionalities without using the Clipboard ribbon. They could use the classic shortcuts like "Ctrl-X, Ctrl-V" key or simply by using the right click shotcuts. I will discuss these items on a separate blog.

I hope this helps...

No comments: