I’m happy to announce the recently registered CallFromExcel.jl, which makes it easy to call Julia from Microsoft Excel - both from worksheet formulas and from VBA. For example:
=JuliaEval("using LinearAlgebra")
=JuliaCall("eigvals", A1:J10)
passes a range to Julia as a matrix and returns its eigenvalues to the sheet.
Highlights:
- Mark your own Julia function with @excel and call it as =jl.my_function(A1, B1)
- Keep big objects (DataFrames, fitted models) in Julia and pass them between formulas as handles
- IntelliSense help in the formula bar, dynamic array support, a Julia ribbon tab
Installation:
using Pkg
Pkg.add("CallFromExcel")
using CallFromExcel
CallFromExcel.installme()
My background is finance, where Excel is ubiquitous. Banks commonly make their “quant libraries” (used to value and risk-manage derivatives) callable both from Excel and from the production systems, such as the end-of-day process that marks positions to market. CallFromExcel is inspired by my experience at a couple of such banks.
I released a predecessor, JuliaExcel, in 2021, prompted by some gaps in JuliaHub’s package JuliaInXL. JuliaExcel turned out not to be a great name - it falls foul of the package naming guidelines. Earlier this year I used Claude to help fix JuliaExcel’s performance shortcomings (and my ignorance of C#), rewriting the Excel side from VBA to C# with Excel-DNA. That was the natural moment to rename the package so it could live in the General registry. JuliaExcel users: see “Upgrading from JuliaExcel” in the docs.
I know Excel has its detractors here, but I love it, just as I love Julia. If you use Excel - or even run your life in it, as I do - please give CallFromExcel a try. Feedback and issues welcome.
Docs: Home · CallFromExcel.jl
Repo: GitHub - PGS62/CallFromExcel.jl: Call Julia from Excel worksheets and VBA (C#/Excel-DNA successor to JuliaExcel.jl) · GitHub
Philip Swannell