Bridge Python and Excel

Write, execute, and manage Python code directly within Microsoft Excel workbooks. Full-featured IDE, custom function publishing, package management, and real-time debugging.

Beta Version
Ready for intensive testing by users - Not for production use
XPyCode IDE Overview

Powerful Features

Everything you need to supercharge Excel with Python

Python Execution in Excel

Run Python code with full access to Excel objects. Manipulate worksheets, ranges, and formatting directly from Python.

Integrated IDE

Monaco-based code editor with IntelliSense, syntax highlighting, and full debugging capabilities.

Package Manager

Install and manage Python packages per workbook with full dependency resolution and version control.

Custom Functions (UDFs)

Publish Python functions as Excel formulas. Use them like any native Excel function.

Event Handling

React to Excel events like worksheet changes and selections with Python callback functions.

Real-time Debugger

Set breakpoints, step through code, and inspect variables with a full-featured debugging experience.

A Complete Development Environment

The XPyCode IDE brings professional development tools directly to your Excel workflow.

  • IntelliSense with auto-completion
  • Syntax highlighting and error detection
  • Project explorer with module management
  • Variable inspector and watch panels
  • Customizable dark and light themes
XPyCode Editor
IntelliSense

How It Works

Get up and running in minutes

1

Install XPyCode

Choose your preferred installation method.

💾
Download the Installer
Windows and MacOS

Get the all-in-one installer that sets everything up automatically.

Go to Downloads
Install via pip with automatic setup

Download the Python package and have it automatically configure everything.

pip install xpycode_master
python -m xpycode_master --setup
🛠️
Install via pip and manually start the server

Download the Python package and manually launch the server when needed.

pip install xpycode_master
python -m xpycode_master
2

Open in Excel

Load the XPyCode add-in and launch the development environment.

📍
Navigate to: Add-Ins → More Add-Ins → Shared Folder
🚀
Launch: Open Console → Click <> Editor
3

Write Python Code

Create modules and start writing Python code that interacts with Excel.

def updateExcelFromPython():
    import xpycode
    ws = xpycode.worksheets. getActiveWorksheet()
    rA1 = ws.getRange("A1")
    rA1.values = "Hello"
    rA1.format.fill.color = "yellow"

Architecture

A modular design for flexibility and performance

Excel Add-in

Office.js-based interface

Business Layer

FastAPI message broker

Python IDE

PySide6 + Monaco Editor

Python Kernel

Per-workbook execution environment

Installation

System requirements and quick setup

Requirements

  • 💻
    Operating System

    Windows 10/11 (64-bit)

    MacOS 14 or higher

    Linux experimental
  • 🐍
    Python

    3.9 or higher

  • 📊
    Microsoft Excel

    2016 or later

    With Office.js Add-in support

Quick Install

Install package:
pip install xpycode_master
Setup server:
python -m xpycode_master --setup

The Excel Add-in will be automatically registered.

Ready to supercharge your Excel workflow?

Start using Python in Excel today with XPyCode

⭐ Star us on GitHub to help promote the project