From 16 October 2026, Python in Excel for the web can no longer read data that comes from Power Query, and Microsoft announced this in message MC1473149 on 16 September 2026. Excel for Windows is not affected. The workbooks that break are the ones where a Python cell reads a query by its name. You can fix this by opening them on your desktop, or by loading the query to a table and pointing the Python cell at that table.

Last updated 30 September 2026 · by Inam Ul Haq, data analyst and automation engineer · about the author

A laptop and a desktop monitor on a wooden desk, both showing a blurred spreadsheet, joined by a thin pale blue cable

This change is about you if you have a workbook where Power Query pulls in the data and a Python cell does the analysis, and you or your team open it in the browser. That Python cell might stop giving you results in Excel for the web after 16 October. This will happen even though nothing in the file has changed.

The news write-ups just repeat Microsoft’s notice and tell admins to “identify users and business processes”. But none of them says how you actually find the cells that will break. They also miss that there is a second way of connecting the two that the notice does not touch, so I wrote this page to explain both things.

Before 16 October, open every workbook that mixes Power Query and Python, and find the Python cells that read a query by name. Then either keep that file on Excel for Windows, or load the query to a table and read the table instead.

The query is not the problem. The problem is a Python cell reading the query directly, and that is one line of code you can change.
01/THE CHANGE

What is Microsoft changing in Excel for the web on 16 October?

Some background first. Python in Excel lets you type Python code into a cell when you start with =PY, and the code runs on Microsoft’s cloud to put the result back in the sheet. But Python there cannot open files or reach the internet by itself. Microsoft’s own getting started page says functions like pandas.read_csv and pandas.read_excel are not compatible, and it tells you to bring outside data in through Power Query instead.

So Power Query became the front door for Python’s data, where the query fetches and cleans the data, and the Python cell reads the result. That is the link being cut in the browser. The message center post is titled “Loading Power Query data to Python in Excel Web: Retirement”, and it says plainly that after 16 October 2026, “workflows that depend on combining Power Query and Python in Excel for the web will no longer function as expected.” You can read the full text on the MC1473149 archive page.

The same post says “no changes are being made to Python in Excel experiences in Excel for Windows desktop”. Its only advice is to move those workflows to Windows desktop. It does not mention Excel for Mac at all. So if your team uses Macs, do not assume anything works until you have tested it.

There is a detail that makes this confusing. Microsoft’s help page Use Power Query to import data for Python in Excel already says that importing external data with Power Query for Python “is not available for Excel on the web”. So you could never set this up in the browser to begin with. What actually stops on 16 October is the browser running workbooks that you built on desktop and then opened online.

02/THE LINK

How does a Python cell read Power Query data in the first place?

Every Python cell gets its data through one function, xl(). You give it the name of something in the workbook, and it hands the data to Python as a DataFrame. A DataFrame is simply a table that pandas, the main Python data library, can work with. There are two ways to point this function at a query, and only one of them is being retired.

The first way is a connection only query. You choose Load To on your desktop, and then Only Create Connection, so the query does not put anything on a sheet. The Python cell then reads the query by its own name, for example xl("Sales"). This is the route Microsoft’s help page teaches, and it is the one that depends on Power Query handing data straight to Python.

A second way is to load the query to a normal table on a worksheet. The Python cell then reads the table like any other Excel data, with xl("Sales[#All]", headers=True). The [#All] part here takes the whole table, and headers=True tells Python that the first row holds the column names. In this route Power Query only fills the table, and Python never talks to the query at all.

TWO WAYS A PYTHON CELL CAN READ A QUERYROUTE 1 · CONNECTION ONLYQUERY: SALES=PY xl("Sales")WEB: STOPS16 OCT 2026THE PYTHON CELL READS THE QUERY ITSELF. NOTHING IS ON THE GRID.ROUTE 2 · LOADED TO A TABLEQUERYTABLExl("Sales[#All]", headers=True)NOT RETIREDTHE PYTHON CELL READS AN ORDINARY TABLE ON A SHEET. THE QUERY ONLY FILLS IT.FROM MICROSOFT MESSAGE MC1473149 AND THE PYTHON IN EXCEL HELP PAGES, READ 30 SEPTEMBER 2026.
fig 01: the two ways to connect a query to a Python cell, and which one the notice retires

Microsoft’s notice is about loading Power Query data into Python, and a worksheet table is just worksheet data once it is loaded. So the table route does not use the connection being retired. I would still test it on a copy of your own file before 16 October. The notice does not name this route, so it is better to be safe.

03/THE AUDIT

How do you find the Python cells that will stop working?

You do not need to click through every cell to fix this. Excel already has two panels that give you the whole picture. Together they only take a few minutes per workbook.

  1. 01
    List the connection only queries
    On desktop, open Data, Queries & Connections. Each query shows a line under its name. The ones that say Connection only are the ones a Python cell may be reading directly.
  2. 02
    Open the Python code editor
    Select any Python cell and go to Formulas, Editor. Microsoft says this pane shows all the Python code in the workbook, listed by worksheet and cell, so nothing hides in a far corner of a sheet.
  3. 03
    Read every xl() call
    If the name inside xl() is one of those query names, that cell is affected. If it is a range like A1:D200 or a table name with [#All], it is not.
  4. 04
    Write the list down
    Sheet, cell and query name, one line each. That short list is the entire fix for that workbook.
FIND THE AFFECTED CELLS IN ONE WORKBOOK1DATA > QUERIES & CONNECTIONSNOTE EVERY QUERY MARKED CONNECTION ONLY2FORMULAS > EDITOREVERY PYTHON CELL, LISTED BY SHEET AND CELL3READ EACH xl(...) CALLA QUERY NAME INSIDE IT = THIS CELL IS AFFECTED4WRITE DOWN SHEET, CELL, QUERYTHAT LIST IS YOUR WHOLE FIXTHE EDITOR NEEDS VERSION 2410 OR LATER ON WINDOWS, AND IS ALSO IN EXCEL FOR THE WEB FOR BUSINESS USERS.
fig 02: the four checks that find every affected cell

There is one thing to watch for. A query name and a table name can look the same, because Excel normally names the table after the query when you load it to a sheet. The difference is the [#All] part and the headers setting. So a bare xl("Sales") with nothing else is the one to look at twice, and if you are unsure, you can click the table on the sheet and read its name on the Table Design tab.

The Python in Excel code editor is available on Windows from Version 2410 for business and enterprise users on the Current Channel, and in Excel for the web for business users. Home users get it through the Insider program. The Queries & Connections list is still the fastest place to start if you do not have this feature yet.

04/THE OPTIONS

What keeps working after 16 October?

You have three honest choices here, and the right one depends on who opens the file and where they open it. I will compare them based on Microsoft’s own pages as I read them on 30 September 2026.

Power Query and Python in Excel after 16 October 2026, from Microsoft's pages read on 30 September 2026
SetupExcel for the webExcel for Windows
Python reads a connection only query by nameStops, per MC1473149Keeps working
Python reads a table the query loaded to a sheetNot named in the notice, test itKeeps working
Refresh that table in the browserOnly for supported sourcesKeeps working
Open the same workbook on desktop insteadNot neededKeeps working

The first choice is the one Microsoft gives, which is to keep the workbook on Excel for Windows. If one analyst owns the file and always opens it on their own PC, this choice costs nothing. You can stop reading here if that is your situation.

The second choice is the table route, and it is the one I would pick for a file that a team opens in the browser. But there is a catch with refreshing the data. Excel for the web can refresh queries from sources like tables and ranges, SharePoint files and folders, SQL Server and some others. But Microsoft’s list of Power Query data sources in Excel versions says it cannot refresh queries loaded to the Data Model, workbooks saved in a third-party cloud, or sources that need an on-premises data gateway, so the table only gets new data when someone refreshes it on their desktop.

If nobody wants to remember to refresh, you can move the refresh itself out of people’s hands. I went through the routes that really run on a timer in how to refresh Power Query automatically. I found that every one of them needs something that stays awake.

05/THE FIX

How do you switch a Python cell from a query to a table?

You should do this in Excel for Windows, where you built the query in the first place. You should also do it on a copy of the workbook first to be safe.

  1. 01
    Load the query to a table
    In Queries & Connections, right-click the query, choose Load To, pick Table, and choose a new worksheet. Excel fills a table with the query result.
  2. 02
    Check the table name
    Click inside the new table and read the name on the Table Design tab. It is usually the query name, but check, because that is the name Python will use.
  3. 03
    Change the one line in each Python cell
    Replace xl("Sales") with xl("Sales[#All]", headers=True), using your own table name. Keep the rest of the code as it is.
  4. 04
    Compare the results before you save
    The output should match what the old cell gave. Check the row count and one total, the same way you would check any number a tool hands you.

That last step matters a lot more than it sounds. Small things can shift when data comes through a sheet instead of straight from the query. A date column might arrive as text, or a number column could have a stray blank. I keep a short routine for exactly this in how I check numbers before I trust them, and it works just as well here.

There is one real limit to this route. A worksheet holds at most 1,048,576 rows, so a query bigger than that cannot load to a table. For data that size, the honest answer is to keep it on desktop only, or to move the heavy part out of Excel. I compared those options in Power Query vs Python for automating reports.

06/THE UNKNOWN

What will the Python cell show in the browser after the date?

Nobody can say for certain yet, and that includes me. Microsoft only says those workflows “will no longer function as expected”, and they do not describe the error or say whether the last result stays visible. Python in Excel normally shows an error value in the cell when code fails. But we will only know what exactly appears after 16 October on the day itself.

That is why I would not wait to find out. A monthly report might depend on one of these cells. The person who opens it in the browser on 17 October might read an error, or they might read an old number without noticing. Fixing it now takes a few minutes per workbook, but finding out in the middle of a month end close takes a lot longer.

A blank paper calendar grid on a wooden stand with one day circled in blue pencil, a closed laptop behind it on the desk
Test the workbook before the date, not on the morning of a month end report.
> Where this leaves you

Excel for the web stops letting a Python cell read Power Query data on 16 October 2026. Excel for Windows keeps this feature. The cells at risk are easy to find with Queries & Connections and the Python code editor, and you can keep each one working by staying on your desktop, or by loading the query to a table and reading the table. If you build reports this way for other people, it is worth a look at how I set up Excel reports that run without me too.

Before 16 October, find every Python cell that reads a query by name. Then keep that workbook on Excel for Windows, or load the query to a table and point the Python cell at the table.

Sources: Microsoft 365 message center, MC1473149, Loading Power Query data to Python in Excel Web: Retirement (16 September 2026); Microsoft Support, Use Power Query to import data for Python in Excel; Microsoft Support, Get started with Python in Excel; Microsoft Support, Python in Excel code editor; Microsoft Support, Power Query data sources in Excel versions. All read on 30 September 2026.