Journal
Work
24 Nov 2021#etl#data#node 1 min read

Stop hand-parsing spreadsheet formulas

The week a home-grown formula evaluator stopped paying for itself.


The first serverless Excel ETL evaluated formulas with code I had written myself. In three days it needed six fixes: references that shifted when rows moved, division by zero, a lookup that missed. Each fix was a wrong assumption about how references behave when cells move.

Two weeks later I replaced the evaluator with a formula-parser library. It fixed the shifting and the ranges in one move, and it still could not do everything, so the remaining cases got explicit handling instead of clever parsing.

Takeaway

An expression evaluator is a product in its own right. Write one only when the library cannot do the job, and know which job that is before you start.

Client engagement, 2021 to 2026. Names, identifiers and internals are generalised.

Related