Forum Discussion

VKH's avatar
VKH
Copper Contributor
Jul 24, 2026

Python in Excel 365 returns #CONNECT! in desktop and web

When I try to enter a simple Python expression (like "PY   1+1" )  in Excel 365 Desktop version or Web-version, I get "#Connect!" mistake in Excel Cell.

When I try to run Formulas->Python->Initialization,  I get error text:   "Error: We weren't able to retrieve this value. We recommend restarting the external code service environment."  
Simple restarting Python Environment with the help of "Reset" or "Reset Runtime" do not solve the problem.
I use Windows 11, Office 365 (family).

PS. I would be happy if somebody could help to solve. As for now, standard Microrsoft Suport recommended to ask for a solution in TechCommunity.Microsoft.Com

1 Reply

  • Python in Excel is available in preview for Microsoft 365 Family in Excel for the web and Windows Current Channel starting with version 2405. Seeing #CONNECT! in both clients means Excel cannot retrieve the Microsoft-hosted Python compute resource; Python runs in a Microsoft Cloud container. Create a blank workbook, choose Formulas > Insert Python, and enter 1+1 to exclude workbook-specific initialization changes. In desktop Excel, open File > Account, confirm the Family subscriber is signed in, select Update Now, and verify Current Channel. Under Account Privacy, enable connected experiences, then restart Excel. Sign out of Excel for the web, sign back in, and test another network without VPN or proxy filtering. Since Reset Runtime already fails in both clients, record the UTC time, Excel version, account region, and error. Submit Help > Feedback, then reopen Microsoft support and ask them to verify the Python entitlement and service availability.