0

I'm trying to close a workbook in the web and have the browser tab just close. I'm making the following calls to do this:

        Excel.run(async context => {
            context.workbook.isDirty = false;
        });            
        Excel.run(async context => {
            context.workbook.close(Excel.CloseBehavior.skipSave); //.save);
        });                   

But when I do this, I get a prompt saying I'm going to be re-directed to the Office 365 home page. If I just try and close the page I get prompted about asking if I'm sure I want to close the page. I've tried changing the .close call to use the Excel.CloseBehavior.save enum but that doesn't behave any differently.

Is there a way to close the workbook that won't prompt me to go to the Office 365 home page and also close the browser tab?

Thanks in advance

2
  • Thanks for reaching us. Looks like current API doesn't meet your needs. For new feature request, we would like to suggest you go to techcommunity.microsoft.com/t5/microsoft-365-developer-platform/… and see if your question has already been asked or ask a new question. Feature requests on it are considered when we go through our planning process. Commented Dec 13, 2023 at 4:14
  • Ok thanks. I'll make that request. Commented Dec 14, 2023 at 15:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.