Why has office scripts stopped working in the desktop app?

Garold Anders 5 Reputation points
2023-06-06T16:54:46.0166667+00:00

I've had a code that has been working for over a month now in the desktop view as thats where I wrote the code but on June 2nd 2023 it suddenly stopped working with no change to the code. It still works in the web view but I need it to work in the desktop view as well. I've tried using the record feature but when I use it and it says action recorded and then when I run it I get the "You cannot perform the requested operation." error when I try to just add a table and even in the sample code excel gives you its stopped working. Does any one know why this is happening?

You cannot perform the requested operation.
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Excel | For business | Windows
{count} vote

1 answer

Sort by: Most helpful
  1. Tanay Prasad 2,250 Reputation points
    2023-06-07T07:05:30.5766667+00:00

    Hi,

    It will be helpful to provide more specific details about the code you're running and any error messages or debug information you have.

    Apart from this, here are a few possible causes and suggestions to troubleshoot the issue:

    1. It's possible that an update to Excel or your operating system has caused a change in behavior. Check if any recent updates have been installed and try reverting them to see if it resolves the issue.
    2. Ensure that the workbook is not being opened in compatibility mode. Compatibility mode can limit the functionality and features available in Excel. To check, go to the "File" menu, click on "Options," and then select "General." Ensure that the workbook is saved in a current file format and not in an older version.
    3. Check if any add-ins or macro security settings have changed. If the code relies on external add-ins or macros, make sure they are enabled and properly configured. Check the macro security settings in Excel to ensure they are not blocking the execution of the code.
    4. Review the Trust Center settings in Excel to ensure they are not preventing the code from running. Go to the "File" menu, click on "Options," then select "Trust Center" and click on "Trust Center Settings." Check the settings related to macro security, trusted locations, and external content.
    5. Verify that the worksheet or workbook is not protected or restricted in any way that could prevent the code from running.
    6. If the code works fine in the web view but not in the desktop view, it could be a user-specific issue. Try running the code on a different user account or computer to see if the issue persists.

    Best Regards.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.