I am creating an Office JS Addin app for Excel in which I have added a custom tab using the manifest. The tab is always visible but a few controls on the tab (i.e. buttons/menus) need to be shown/hidden based on certain conditions.
I read the official documentation and understood that the tabs can be shown/hidden using the contextual tab method but the controls can only be enabled/disabled. I even tried to write some javascript to access the button from the ribbon using "aria-label" but that didn't work. Any advice on how this can be achieved?