xllify

Hello, world

Introducing xllify - build Excel custom function add-ins in Luau or with AI code assist, no C++ or JS required.

Excel is perhaps the original rapid application development tool. People do unholy (and possibly illegal) things to get the job done with no code, or perhaps with just a smattering of VBA. These solutions can be brilliant in the moment but, long term, tend to end up brittle and hard to extend.

Over the years there have been many approaches for extending Excel beyond formula soup and VBA. There is the excellent Excel-DNA, PyXLL, xlwings, Microsoft’s own Office.js and Python support, among others. Each comes with trade-offs around performance, costs, platform requirements and developer tooling. Ideally, you want the benefits of the C SDK without ever having to touch it.

xllify is a simple platform that lets you write Excel custom functions in Luau (why Luau?) instead of C++, VBA, or Python. You write (or use xllify Assistant to generate) code in a very simple scripting language, build it online, or with the CLI… and you have a proper Excel add-in that you can deploy as you wish.

xllify offers two flavours of add-in output:

  • Office Add-ins (WASM) that work across Windows, macOS and Excel for the web. These can be previewed instantly in the browser with no setup at all. These are the modern, cross-platform, more secure approach. Sadly, they can be a bit slow, particularly on the Mac.
  • Native XLL builds just for Windows, which run in-process with Excel and support multi-threaded recalculation. Compact, single-file assemblies with zero dependencies. There are some security considerations worth knowing about before distributing one.

Both are built from the same Luau source. There is more on how that works.

Both runtimes execute the same, identical bytecode, so your functions behave the same regardless of platform. Your functions execute in a sandboxed VM with no network or filesystem access - your data stays local, and there is no risk of add-ins being used as attack vectors.

A quick example

Here’s a trivial function that joins values from a range with a separator. It’d be handy if this existed in Excel, but doesn’t:

xllify.ExcelFunction({
    name = "XJOIN",
    description = "Join a range of values with a separator",
    category = "Text",
    parameters = {
        { name = "range",     type = "string", dimensionality = "matrix", description = "Values to join" },
        { name = "separator", type = "string", description = "Separator string" }
    }
}, function(range, separator)
    local parts = {}
    for _, row in ipairs(range) do
        for _, val in ipairs(row) do
            if val ~= nil and val ~= "" then
                table.insert(parts, tostring(val))
            end
        end
    end
    return table.concat(parts, separator)
end)

Install the xllify tools if you haven’t already and follow any setup instructions it gives you. The CLI is available for Mac, Linux and Windows.

macOS / Linux:

curl -fsSL https://xllify.com/install.sh | bash

Windows (PowerShell):

irm https://xllify.com/install.ps1 | iex

Clone the starter template (or create a GitHub repo from it):

macOS / Linux:

git clone https://github.com/xllifycom/local-starter my-first-addin
rm -rf my-first-addin/.git

Windows (PowerShell):

git clone https://github.com/xllifycom/local-starter my-first-addin
Remove-Item -Recurse -Force my-first-addin\.git

Save the above code snippet as xjoin.luau inside the functions directory. Then build it:

xllify build xll -o xjoin.xll functions/xjoin.luau

Open Excel, load xjoin.xll (double click it), and see that =XLLIFY_START.XJOIN(A1:C10, ", ") works - no install, no Python environment, just a <1MB file. The XLLIFY_FIRST namespace prefix can be changed in xllify.json.

This blog

That’s all for now. We’ll write here about building xllify - design decisions, architecture, things that didn’t work - plus Luau patterns and the broader Excel add-in landscape.

xllify is available now. If you have any questions, drop me a line via email or on LinkedIn.

← All posts