0
votes

I'm a newbe inXML

I wrote XML for Excel-Ribbon Tab and I want to add my custom Tab to the ribbon for a single Excel workbook I have to share with collegues. Thanks to online docs I've find and followed the procedure described in Microsoft docs:

  • Created the customization file in text editor and saved the name customUI.xml in a folder named customUI

The XML is

 <customUI onLoad="RibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
   <ribbon>
     <tabs>
       <tab id="TabEasyQuery" label="Easy Query" insertAfterMso="TabHome">
         <group id="eQgenerale" label="Generale" autoScale="false">
   ... my commands ...
         </group>
       </tab>
     </tabs>
   </ribbon>
 </customui>
  • Add a .zip extension to the Workbook file name and opened the file, extract the _rels folder and edited the .rel file using text editor adding the relationship:
<Relationship Id="frapozzeID" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="customUI/customUI.xml" />
  • replace the _rels folder in the .zip pack (the workbook)
  • copy the customUi folder in the .zip pack
  • remove the .zip extension

Everything works fine for a basic-Tab with single Groups and Buttons, but doesn't work if I try to add a splitButton and/or menu

I have tried to change both the relationship in .rel file as follows:

<Relationship Id="frapozzeID" Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility" Target="customUI/customUI14.xml" />

also renaming the file in customUI folder: customUI14.xml and changing the reference in

 <customUI onLoad="RibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
   <ribbon>
     <tabs>
       <tab id="TabEasyQuery" label="Easy Query" insertAfterMso="TabHome">
         <group id="eQgenerale" label="Generale" autoScale="false">
   ... my commands ...
         </group>
       </tab>
     </tabs>
   </ribbon>
 </customui>

but with no effect.

1
SOLVED. it was just to fix the XML code (check it enabling the "show add-in user interface errors") so I can confirm the a/m procedure to add Custom Tab worksFrapozze

1 Answers

0
votes

It was just to fix the XML code (check it enabling the "show add-in user interface errors") so I can confirm the a/m procedure to add Custom Tab works.