About
What is xplo?
xplo is an Excel spreadsheet "compiler" - it translates an Excel workbook into performant code that can run anywhere.
We built xplo for the folks that use Excel as part of how they think, analyze, and collaborate. With xplo, Excel can stay the 'source of truth', and you can use thier logic anywhere - data pipelines, websites, APIs - anywhere code can run.
How you use it
Using xplo is simple:
- Upload your
.xlsxfile - Wait for it to process (this can take several minutes for large spreadsheets)
- Call it like a function or an API in your language and mode of choice - you give it inputs/cell values, and ask it for the resulting cell values that matter to you. Evaluation takes milliseconds, even for very large calculations.
What do you mean 'call it'?
"Calling" the spreadsheet just means feeding it one or more scenarios you want to have it compute: each scenario describes the inputs (i.e. cells you want to change) and requests outputs (i.e. cells you want to re-read after the recomputation of the sheet has been re-computed). Think of it like editing the cells in your spreadsheet, and then looking at the resulting value of some other cells.
Names and Labels
If you want to specify these input and output cells by cell references such
as Forecast!B7, you can do that, but to make it easier to work with the generated code,
you can use
Naming + Labeling to give your values defined names, which make analysis
and maintainance even easier.
Where can you 'call' xplo code from?
How you call an xplo spreadsheet is up to you - you can download a binary and run it on your hardware as a library in any language, you can grab the javascript client harness and run it in the browser, or you can call it as an API, and have xplo do the computation for you on our servers.
Xplo makes it easy to use the logic of your excel sheet in whatever language and system you're already using.
How does it work though?
Xplo's compilation process is straightforward:
- It parses the spreadsheet and extracts all of its cells and relevant metadata, including the formulas.
- It computes the graph of how different cells rely on one another.
- It then converts each cell into a function - this function calls the functions for other cells and ranges and combines them in rust-specific implementations of the excel functions.
- It then uses all of these generated function definitions within a harness in rust that describes things like iterative calculation, and how to handle some harder pieces of engine logic.
- The rust code, once generated, can either be compiled, or lowered to a native VM built for xplo specific tasks. You don't need to think too much about this, but essentially the compiled version is very fast to run, but takes several minutes to create, but the VM-based system is much faster to create, and slower to run.
- This code is then wrapped in a variety of utilities like an API, a CLI, a Monte-Carlo simulator, Hosted HTTP SDKs, and Local Runtime Clients, so xplo is easy to use however it works best for you.
This is a heavily simplified picture - xplo is doing a lot of work behind the scenes to achieve fast runtimes - you shouldn't need to think about these optimizations to benefit from them.
How can I trust it?
Xplo is trying to emulate the computational behavior of 2024 Microsoft Excel Long-Term-Support version 2408, specifically the Build 17932.20638. It does a very good job, and we have (incredibly) rigorous testing and validation.
Read the full article on this topic, or visit our current support dashboard.
Why did you build this?
We first ran into this problem when trying to modernize a spreadsheet that was estimating coal powerplant emissions (to try to minimize them). It was a enormous spreadsheet that took multiple minutes to run, and we wanted to try to get its logic running in seconds, over an API.
Since then, we've met insurers, consultants, legal scholars, and other environmental modelers that all have the same problem: they think and collaborate in Excel, but Excel is slow, and hard to plug into other systems.
We built xplo to give people the best of both worlds - build and collaborate in excel, then execute, test, and evaluate in xplo.
How fast is xplo?
Consider a real example: a 5MB actuarial workbook used in a major insurance firm, with ~300,000 cells across 98 sheets.
When running locally via python automation of real excel, this spreadsheet takes 26 seconds to execute and grab all of its cells' values. On the xplo VM, it achieves 8 executions per second per thread, so on a multicore machine (a Mac Studio) it can execute at 130 executions/second, once parallelism around inserts is considered. Once compiled (a one-time cost of 6 minutes for this spreadsheet), it achieves 260 executions per second per thread, so onthe same high powered mac, it can execute at 5,000 executions/second, once parallelism around inserts is considered.
| Execution time per thread | Per-machine Parallelism | Number of Recomputes/Minute | |
|---|---|---|---|
| Real Excel, on a Windows Machine | 26s | 1 (No way to parallelize) | ~2.2 / minute |
| Xplo - VM Architecture | 120ms | 28 (# of machine cores) | 8,000 / minute |
| Xplo - Compiled | 3.8ms | 28 (# of machine cores) | 300,000 / minute |
Note: the reason per-thread performance doesn't scale linearly is just because of parallelism penalties in how you write and store outputs.
How is it ~10,000x faster?
This speedup comes from a few different places. For one, xplo compiles to Rust, a fast low-level language. For another, xplo is heavily optimized to only recompute the cells that need to recompute. For a third, xplo and has thoughtfully designed memory layout to minimize the number of pages that need to be in memory during a recomputation.
This result seems crazy - is it a one off?
This performance varies per sheet, but we typically see speedups on the order of 1,000x - 10,000x relative to native excel, and ~10-100x better performance than facile formula compilation or python formula evaluation.