Correct behavior of the Excel.CloseBehavior enum when trying to close a workbook in the web

27 Views Asked by At

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

0

There are 0 best solutions below