Share via

Python connection issues

Lou 0 Reputation points
2026-01-02T22:18:58.89+00:00

if anyone can give me a steer I’d appreciate it.

just subscribed to excel mainly to use python and link in APIs for what I’m doing. Any connections at all gives me tunnel errors or bad 400 errors proxy issues. I have run so many things to fix this just get nowhere. Is this a server issue or an issue with my licence not updating correctly etc?

it does not connect to anything online on windows and on browser

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Marcelo Mendoza 10,680 Reputation points Independent Advisor
    2026-01-02T22:57:17.8933333+00:00

    Hello Lou,

    Thanks for reaching out and I’m really glad you asked before spending more time trying to fix something that isn’t actually caused by your proxy or your setup. I understand you’re seeing tunnel errors and 400 Bad Request messages every time Python tries to connect to an API in Excel whether you’re on Windows or using Excel in the browser. That can absolutely be discouraging especially after subscribing specifically to use Python for API work and finding that nothing online will connect the way you expected.

    Python in Excel runs entirely inside a secure cloud container and that environment is intentionally blocked from making outbound internet calls. Because of this design any attempt to reach an external API will fail and often shows up as ProxyError or 400‑type failures even when your own network and proxy settings are fine. This is part of how Microsoft protects users from data exfiltration and is the reason direct requests from Python code using the =PY function don’t go through.

    The best workaround is to bring the data into Excel first using connected tools such as Power Query or other approved connectors and then use Python in Excel to analyze it once the data is already in the sheet. If you’re concerned that your license may not have updated yet you can refresh it through File then Account then Update License as Python in Excel relies on cloud compute and may take some time to synchronize.

    What API or data source are you planning to use and would bringing that data into Excel through Power Query or another connector fit into what you’re trying to build?

    I hope this answer is helpful if you have further questions feel free to reply back

    Regards,

    Marcelo

    Was this answer helpful?


  2. AI answer

    2026-01-02T22:19:07.83+00:00

    It sounds like you are experiencing connection issues when trying to use Python with Excel, particularly when linking to APIs. Here are a few troubleshooting steps you can consider:

    1. Check your Internet Connection: Ensure that your internet connection is stable and that you can access other online services without issues.
    2. Firewall and Antivirus Settings: Sometimes, local firewall or antivirus software can block outgoing connections. Make sure that Excel and Python are allowed through your firewall.
    3. Proxy Settings: If you are using a proxy server, ensure that your proxy settings are correctly configured in both Windows and Excel. You might need to adjust these settings to allow connections through the proxy.
    4. Excel and Python Configuration: Ensure that your Excel and Python installations are correctly set up and updated. Sometimes, issues arise from outdated software versions.
    5. License Issues: If your license is not updating correctly, it might affect your ability to connect to online services. Verify that your Microsoft 365 subscription is active and functioning properly.
    6. Try Different Networks: If possible, try connecting from a different network to rule out network-specific issues.

    If the problem persists after trying these steps, it may be beneficial to contact Microsoft support for further assistance.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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