'Office.js | Desktop excel | restrict user to interact with excel or add-ins pane if dialog is open
I am using office.js to create excel add-ins. I do have requirement to open dialog box from task pane and show task pane content in to the dialog box. To show task pane content on dialog box using client side routing. Using below code we are able to open dialog in online as well as in desktop excel.
const urlDialogBox = `${window.location.origin}/#/output-form/`;
Office.context.ui.displayDialogAsync(
urlDialogBox,
{
height: 80,
width: 80,
displayInIframe: true,
},
asyncResult => {
dialog = asyncResult.value;
dialog.addEventHandler(
Office.EventType.DialogEventReceived,
processDialogEvent,
);
dialog.addEventHandler(
Office.EventType.DialogMessageReceived,
processMessage,
);
},
);
Now the requirement is once user opens the dialog box from task pane, restrict user to interact with task pane as well as excel area. In Online excel (Office 365) its working as expected, dialog box is working like popup and do not allow user to click on task pane as well as in excel area.
How can we use dialog box to work like popup in case of desktop excel? Is there any way or it is the limitation in case of desktop excel.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|