2

Wanted to show/hide custom ribbon button using officejs in typescript.

Tried getting element of custom ribbon button using jquery but not able to get the same since id getting random every time excel run.

$("#id__1157").id.hide()

Expected Result: Wanted to show/hide custom ribbon button in Excel using officejs in typescript

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43

1 Answers1

4

The ability to how/hide a custom ribbon button is not yet available in the Office JavaScript library. But we are working on it and hope to have it soon.

UPDATE May, 2021: Custom contextual tabs is now available on Excel. For details, see Create custom contextual tabs

Rick Kirkham
  • 9,038
  • 1
  • 14
  • 32
  • 1
    Hi Rick, Any progress on this feature? Also please find below requirement. 1) Login button should be in ribbon command, 2) once login successful, login button should be replaced with xsi:type="Menu" control. Can you please confirm ASAP. – Muruga ananth Jan 07 '20 at 08:31
  • Can you please confirm as I can see preview in official website. But I tried below getSubject false – Muruga ananth Apr 14 '20 at 16:18
  • 1
    This is still not available. We are previewing a feature in Excel only that will allow add-ins to programmatically enable and disable ribbon buttons, but the feature will not allow them to hide or show buttons. – Rick Kirkham Apr 14 '20 at 18:17
  • 2
    We have a "no vaporware" policy at Microsoft, so I have to be hazy, but I can tell you we are working on a show/hide feature. – Rick Kirkham Apr 16 '20 at 17:44
  • 1
    Thanks for the confirmation Rick... And looking forward with feature ASAP... – Muruga ananth Apr 29 '20 at 02:45