Sharing Python-Powered Excel Workbooks
Here’s what happens when you share (or receive) a Python-powered workbook:
(The same applies to the Python-powered workbooks in the course resources!)
Scenario 1: Recipient HAS "Python in Excel" Enabled
If the recipient has the feature active on their version of Excel, the workbook runs natively for them:
-
Automatic Execution: Excel connects to the Microsoft Cloud and executes your
=PY()formulas seamlessly. - Full Editing Rights: They can click any Python cell to view, edit, or debug your code, and toggle outputs between Python Objects and spilled Excel values.
- No Local Setup Needed: They don't need Python, Jupyter, or any libraries installed locally; everything runs inside Microsoft's secure Anaconda container in the cloud.
- #CONNECT Errors? In the Excel Ribbon, go to Formulas → Python → Reset → Reset Runtime.
Scenario 2: Recipient DOES NOT Have "Python in Excel" Enabled
If you send the file to someone on an older version of Excel, an unsupported platform (like Excel for mobile), or someone without a supporting Microsoft 365 subscription:
1. Cached Results Remain Visible
When they open the file, they can still see the last calculated values and plots exactly as they were when you saved the file. Excel displays these cached static results so the sheet remains readable.
2. Recalculation Triggers Errors
Attempting to recalculate the sheet or edit dependent data will fail because Excel cannot connect to the cloud Python runtime, triggering a #BLOCKED! error (or a #NAME? error on older versions).
3. Read-Only Code Visibility
They will be able to see the text of your script in the formula bar (prefixed by =PY(...)), but they will not be able to run it, open the Python Editor, or execute new Python blocks.
Best Practice:
If you need to share a Python-powered workbook with someone who doesn't have the feature enabled, create a copy of the file and Paste as Values (or convert plots to standard images) before sending it so their grid stays clean and functional.