exceloffice-addinsexcel-addinsexcel-web-addins

Show excel contextual tab by default


I am trying to create new excel web-add in using JavaScript (https://learn.microsoft.com/en-us/office/dev/add-ins/design/contextual-tabs).
But I am not sure how I can display the contextual tab automatically at the time of load of excel document. I tried
await Office.ribbon.requestCreateControls(contextualTab);
in Office.onReady but still the tab does not show immediately.
It works when I click on the task pane command button. Any suggestions will be really helpful.


Solution

  • I was able to achieve by creating a CustomTab entry in manifest.xml file is instead of creating it programmatically