Python in excel is not working, giving #Blocked error message

Anonymous
2024-01-17T00:24:35+00:00

Having installed excel Microsoft windows Insider version, although I see Python in the formula bar. But I am having issues running the Python formula. Even when I try inserting samples from sample_df.describe, I get the #Blocked! error message.

Appreciate all your help to resolve this issue. :)

FYI. I am having Microsoft® Excel® for Microsoft 365 MSO (Version 2402 Build 16.0.17304.20000) 64-bit

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

10 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-17T03:41:47+00:00

    Hello Debashis,

    I'm Ibhadighi and I'd happily help you with your question. In this forum, we are Microsoft consumers just like yourself.

    It seems you're encountering a #BLOCKED! error message when attempting to use Python within Excel. This feature allows you to run Python scripts directly in Excel, but it requires some setup and permissions. Here’s a simplified approach to resolve this issue:

    1. Ensure that Python scripting is enabled in Excel options. You can usually find this under File → Options → Trust Center → Trust Center Settings → External Content. Here, you should see an option to enable Python.
    2. Make sure that Python is installed on your system and that Excel is pointing to the correct installation path. Excel needs to know where Python is installed to run scripts.
    3. The #BLOCKED! error may also indicate that the action you're trying to perform is being blocked by your Trust Center settings. In Trust Center, check that all necessary settings are enabled for running Python scripts.
    4. If Python support comes as an add-in, make sure the add-in is installed and activated. You can check this in File → Options → Add-ins.
    5. Since you're using an Insider version of Excel, there might be updates that need to be installed. Insider builds often get frequent updates that can fix bugs like this.
    6. If Excel's Python features are not working, consider using Office Scripts if it's available for your task. Office Scripts is a feature in Excel for the web that allows you to automate tasks.
    7. Sometimes, running Excel as an administrator can resolve these issues. Right-click the Excel icon and select "Run as administrator" to see if that helps.
    8. Occasionally, firewall or antivirus settings can block scripts from running. Check your security software settings to ensure they’re not interfering with Excel’s scripting capabilities.

    Please try these steps in order, and if you continue to have issues, you may need to seek further assistance from someone who can access your system settings or from Microsoft's support channels directly https://support.microsoft.com/contactus.

    Please remember that I am a User on the forum just like you and do not have access to Microsoft's database.

    I hope this helps.

    Best Regards, Ibhadighi

    0 comments No comments
  2. Anonymous
    2024-01-17T05:43:14+00:00

    Thanks Ibhadighi , appreciate your effort, I tried all the options you suggested, but unfortunately, they did not work.

    It could be the Bugs possibly and excel update would be able to fix the issue. I will try to reach the MS. support team for any updates and finding will keep you posted . Cheers mate!

    0 comments No comments
  3. Anonymous
    2024-01-18T00:38:05+00:00

    Hello Debashis,

    Thank you for letting me know.

    Unfortunately, I’m really sorry I don't have any further troubleshooting to offer.

    There are many knowledgeable users active on the forum and I hope that someone else can offer further insight into your issue.

    Thank you, Ibhadighi

    0 comments No comments
  4. Anonymous
    2024-02-22T01:09:24+00:00

    I tried this one by running it as an administrator and it worked!

    0 comments No comments
  5. Anonymous
    2024-03-20T09:58:17+00:00

    Did you get any update.... Even I'm suffering the issue since today afternoon.

    0 comments No comments