Excel to Rust

Convert Excel to Rust code

Turn Excel formulas into a Rust library, an Axum REST API and a WebAssembly module. Rust is Codcel's core engine: fast, memory-safe and fully yours.

How it works

  1. 1

    Tag inputs and outputs

    Mark which cells in your workbook are inputs and which are results. Your formulas stay exactly as they are.

  2. 2

    Generate Rust code

    Codcel reads every formula and dependency and generates a Rust project that you own.

  3. 3

    Test against Excel

    Generated tests compare the code's results with your workbook's values, so you can show they match.

What Codcel generates for Rust

Calculation library

Every calculation in your workbook becomes a Rust function with typed inputs and outputs.

REST API server

One POST endpoint per calculation, with JSON in and out, CORS, and an OpenAPI 3 description.

WebAssembly module

Runs your calculations in the browser, with no server, through generated JavaScript and TypeScript bindings.

Web client

A typed Rust client for the generated REST server that handles the HTTP calls and JSON for you.

Powered by a compiled Rust engine

The Rust project is Codcel's core output. Every other language builds on it, and it runs your calculations as compiled native code.

Calling the generated code

Each calculation in your workbook becomes a function. In this example the workbook has a calculation named monthly_payment.

use codcel_calculation_engine::value_format::ValueFormat;

// Default formatting (OS locale + env vars)
let result = calculate_monthly_payment(&input).await;

// With a per-call formatting override
let vf = ValueFormat::from_language_with_env("de");
let result = calculate_monthly_payment_with_format(&input, vf).await;

Build and test

Build system
Cargo
Build
cargo build --release
Test
cargo test
Server framework
Axum (default port 3030)
Read the documentation

Why teams use Codcel

460+ Excel functions

Lookups, dynamic arrays, financial, statistical, text and date functions, with the known differences from Excel documented.

Source code you own

No proprietary runtime and no lock-in. The code lives in your repository and is reviewed like any other code.

Built for large models

Tables with millions of rows, including a one-billion-row benchmark, run through the same engine.

Proven against Excel

Generated tests check the code's results against the values in your spreadsheet.

Frequently asked questions

Can Codcel convert any Excel spreadsheet to Rust?
Codcel converts the formulas, named ranges and tables in .xlsx, .xlsb and .xls workbooks, and supports more than 460 Excel functions. The documentation lists every supported function and the few known differences from Excel.
Do I need to rewrite my formulas?
No. You mark which cells are inputs and outputs, and Codcel reads your formulas as they are.
Is the generated Rust code readable?
Yes. It is ordinary source code with typed inputs and outputs and generated tests. Your developers can review it, version it and change it.
Does the generated code need Excel or a Codcel service?
No. The generated project runs without Excel and without calling any Codcel service. It includes the open-source Codcel calculation engine, which is built along with your code.
How much does it cost?
Codcel is free for personal use. Commercial use runs on credits, and every plan includes the full source code and all generation options.

Turn your spreadsheet into Rust code

Download Codcel Desktop for free, or bring your hardest model to a 30-minute demo.