Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Love the part about circular references. I gotta say though - I'm having a difficult time imagining how complex these fomulas are that reimplementing Excel's formula engine is easier than just porting the formulas into JS.


The good news is that formulajs had a huge number of those functions implemented in JS already. Almost all of the time was spent on the engine, which wasn't a huge amount of code.

The problem with porting the code to JS is that a.) nothing is named, b.) there's no real way to organize the code you've written because you're going from a spatial way of organizing code to imperative script, and c.) the actual design of the spreadsheet wasn't known to any engineers (it was designed by a data scientist, or perhaps an analyst). The work of translating would have meant really understanding what the thing is so that it can be turned into functions and modules. It also would have still required getting Excel function equivalents, since there's not a 1:1 equivalence between Excel and what's available in the JS standard lib.


Honestly, if you're at 'thousands of formulae' across multiple sheets, I'd probably suggest writing a graph based execution engine too.

The circular reference thing would have definitely thrown me for a loop though.


I just want to let you know that the pun in the last line didn't go unappreciated.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: