Search code examples
excelribbonx

Unable to include a specific gallery in customUI14.xml for Excel


I am creating a custom ribbon in Excel 2019 using customUI14.xml. I have been able to successfully include galleries in the XML file, some examples are shown below and they reflect successfully in the Excel ribbon.

                    <gallery idMso="ThemeEffectsGallery" size="large" />
                    <gallery idMso="ChartColorsGallery" size="large" />
                    <gallery idMso="ThemeColorsGallery" size="large" />

However when I try to include the gallery ChartLegend in the XML file using the below line it does not show up in my custom ribbbon in Excel 2019

<gallery idMso="ChartLegend" size="large" />

Any suggestions on how to achieve this would be helpful. Thanks


Solution

  • Icon for "ChartLegend" is only visible/enabled when a chart is selected.

    If you set visible explicitly to true it is always visible (but only enabled when a chart is selected):

    <gallery idMso="ChartLegend" size="large" visible="true"/>