XlBridge logo

Write user-defined Excel formulas in .NET (C#) or Python. No more VBA!

Excel formulas in C# or Python

XlBridge enables you to create Excel formulas using C# or Python using your standard toolset. Only a few lines of code is needed to expose an existing library to Excel.

Your custom code runs outside the Excel process, preventing your own bugs from crashing Excel and letting you update or add formulas without restarting Excel.

The XlBridge add-in communicates with your custom code through (local or remote) gRPC connections.

Getting started

Installation

Download and install the Excel add-in

C#

The essential code needed to expose C# functions to Excel is:

    var testServer = new BridgeServiceBuilder()
        .AddFunctions.FromType<MyFunctions>()
        .CreateNativeGrpcServer();
    
    testServer.Start();
    
    await testServer.ShutdownAsync();

For step-by-step instructions, see Getting started in C#.

Python

The essential code needed to expose Python functions to Excel is:

    server = xlbridge.server()
    server.add(myfunctions)
    server.run()

For step-by-step instructions, see Getting started in Python.

Configuring the add-in

In the simple case, no configuration is needed. Your formulas will be available in Excel when the add-in is installed and your calculation server is running.

For additional functionality and more advanced uses cases, see Using the add-in

Read more