12 ms·
IronCalc – Open-Source Spreadsheet Engine
- kaathewise 2y agoA spreadsheet engine. It's a React app with a Rust backend, but it impressed me how snappy it was[0]. Of course, it's not nearly as feature rich as Google Sheets, not to mention Excel. [0]: https://app.ironcalc.com/ https://app.ironcalc.com/
- mdaniel 2y ago"backend" seemed to imply it was contacting some server, but https://github.com/ironcalc/ironcalc#early-testing https://github.com/ironcalc/ironcalc#early-testing claims (and the network tab confirms) it is just Rust compiled to wasm, no "backend" required MIT or Apache 2 (player's choice) if anyone else has grown deeply suspicious about any "open source" HN headlines of late
- fsckboy 2y agobackend does not imply server to me, it implies software that does the calculating engine work and does not concern itself with display refresh.
- deleted 2y ago[deleted]
- readthenotes1 2y agoIn code that typically runs in on e process, that's a plausible interpretation. However, the browser, sorry, the Internet browser, is typically a distributed system and a more plausible interpretation of backend is server-side. IMNSHO.
- ninalanyon 2y agoSurely that's background not backend.
- 8n4vidtmkvmk 2y agoI wouldn't call it background unless maybe it's async or continues to process stuff while you're doing other things.
- fsckboy 2y agowhat's the backend of a spreadsheet engine going to be doing? updating the datastructures of the spreadsheet. is it going to be local or remote? that's not part of the question. is it foreground or background? that's an implementation choice. apple II, yeah, everything freezes while it recalcs. windows? recalcs when it can, don't let the mouse freeze.
- bonoboTP 2y agoBackend is a general word, not limited to client-server or the web. You can have a rendering backend with various configurable choices, like in Matplotlib (https://matplotlib.org/stable/users/explain/figure/backends.html https://matplotlib.org/stable/users/explain/figure/backends....), or the deep learning library Keras has a choice between PyTorch, JAX and TensorFlow backends.
- fsckboy 2y agowe're talking about a spreadsheet engine, the backend is not going to be the Xserver displaying it
- kaathewise 2y agoRight, I've made a mistake! I keep getting surprised by the fact it's possible to simply compile a Rust crate with a WASM target and run it in the browser.
- nhatcher 2y agoIt's running entirely on your browser unless you click share, download or import. The computation part is done in Rust compiled to wasm. Thank you for posting!
- kaathewise 2y agoYep, I've misunderstood, realized it after seeing mdaniel's comment. Thanks for making this in the first place! I saw IronCalc in the list of projects supported by NLnet and it grabbed my attention. By the way, if You don't mind me asking, how'd Tuta end up sponsoring IronCalc? It seems that lately they and Proton have been trying to expand their business away from just email. The fact that Tuta is interested in IronCalc makes me think they want to have an office-like offering.
- nhatcher 2y agoTuta sponsors by providing us with free email accounts, that's all. I reached out months ago, they liked the project and were kind enough to help us out with the email. I haven't have talks with them about integrating IronCalc, but it is something that is on my mind.
- kaathewise 2y agoAh, I see. Best of luck with that! There are a few projects where I'd love to see a modern spreadsheet implementation. CryptPad comes to mind. They use OnlyOffice, which is quite featurefull, but takes awhile to load and isn't as responsive.
- nine_k 2y agoWhat Google Sheets functionality you're missing there? Of course there's a lot missing, but what's interesting is what you've reached for and could not find.
- snthpy 2y agoHow tightly coupled are the React app and the Rust backend? I hope the backend engine can be used standalone embedded in other apps.
- nhatcher 2y agoHey! This is my project! Amazed to see this here. I'll try to answer questions people might have
- readthenotes1 2y agoWhat keeps me in Excel 2007 is Goal Seek. I'm not sure how unusual I am, but would be interested in knowing:)
- nhatcher 2y agoThanks for the feedback, I will keep this on the back of my head. This and things like sensitivity analysis are not in our immediate roadmap, but this is the kind of thing that would be fairly easy to add. You can do it right now programmatically, of course.
- fatih-erikli-cg 2y agoWhere and how do you handle the operator precedence? I couldn't find in the codebase.
- mdaniel 2y agoI'm cognizant it's just documentation, because the code is its own thing, but it seems to be a recursive descent parser https://github.com/ironcalc/IronCalc/blob/2c2228c2c26386b0197858879eeac195ca39839f/base/src/expressions/parser/mod.rs#L9-L15 https://github.com/ironcalc/IronCalc/blob/2c2228c2c26386b019...
- fatih-erikli-cg 2y ago[flagged]
- bonzini 2y agoThe function for asterisks and slashes is called from the functions for pluses and minuses. The result is that asterisks and slashes are evaluated before pluses and minuses. It's actually very easy to understand once you get the idea. https://en.wikipedia.org/wiki/Recursive_descent_parser https://en.wikipedia.org/wiki/Recursive_descent_parser
- deleted 2y ago[deleted]
- dangsux 2y ago[dead]
- franga2000 2y agoIt's a cool project, but wow is the top of the page just absolute buzzword salad! > The democratization of spreadsheets > Empowering Everyone with Advanced, Open-Source Spreadsheet Solutions It's a really fast spreadsheet engine that runs entirely in the browser and is fully open source. That's all the sales pitch I'd need, but I'm a developer... So, serious question: who is this kind of marketing targeting?
- nhatcher 2y agoI'm a software developer with extremely bad marketing skills... This project targets both end spreadsheet users and developers. In its first an engine (a Rust crate) then a full fledged product. FWIW, I'm over them moon this project is getting some traction :)
- bonoboTP 2y agoI agree that the bullet points feel like ChatGPT output. Whether an LLM was involved or not, it's good practice nowadays to avoid that AI style as many are getting used to spotting it and frown about it.
- HKH2 2y agoI'm not sure what you mean by 'that AI style'. What are some examples?
- bonoboTP 2y agoGerund Adjective Noun (heading) * Gerund Adjective Noun (bold): (colon) text (non-bold). ---- Already the format like this. Then plus points for sounding like an empty phrase that chatgpt likes. Eg from the heading "Addressing Unmet Needs" then bullet "Empowering SaaS Developers:" in bold. It's hard to describe. If you use chatgpt a lot, you develop an intuition that has many components.
- HKH2 2y ago
- howthisends 2y agoThis is awesome. Will try using it as the foundation of some web tools.
- nhatcher 2y agoIf you do and want help with, don't hesitate in contacting me. Right now you can't just `npm install ironcalc`, but hopefully that will be in place in a month from now.
- dwroberts 2y agoHad a comment here about larger values/arbitrary precision (e.g. 74829901923401860/14408150751351922) and realised that it isn't choking on the number but it seems to error if I paste in values? In Firefox: Uncaught RuntimeError: unreachable executed pasteCsvText assets/index-BxqQcmeI.js:40
- nhatcher 2y agoThanks for the bug report! I just added csv copy/paste, most likely an error there. We don't support arbitrary precision arithmetic but I would like to.
- iamthejuan 2y agoI am genuinely looking forward for the success of this project. I am just wondering will this support scripting language like VBA for Microsoft Excel?
- nhatcher 2y agoThanks. I am thinking a lot about this recently. We will definitely support a scripting language, or rather several scripting languages. VBA won't be one of them, I think. I wouldn't want to create a language just for this. Maybe use a language like Lua or perhaps Rhai[0]. By design extending and embedding IronCalc should be very easy. Work in this direction will not start in the next 9 months though. [0]: https://github.com/rhaiscript/rhai https://github.com/rhaiscript/rhai
- bonoboTP 2y agoNice work. Clicked around in it, some default features I'm used to are missing, like clicking on a row or column header to select the whole thing, or double click the resizer between two columns to autosize the column to content length.
- nhatcher 2y agoThanks, those things are on the roadmap :)
- 8n4vidtmkvmk 2y agoIIUC, this project is focused on the calculations, not the UI.
- phonon 2y agoThis looks great! Do you use cached calculation chains for performance optimizations? Do you take volatile functions into account? https://learn.microsoft.com/en-us/office/vba/excel/concepts/excel-performance/excel-improving-calculation-performance#full-calculation-and-recalculation-dependencies https://learn.microsoft.com/en-us/office/vba/excel/concepts/...
- nhatcher 2y ago> Do you use cached calculation chains for performance optimizations? Not yet, there is heavy research in that direction. I will write on this soo-ish > Do you take volatile functions into account? Yes, for instance RANDBETWEEN and NOW are implemented. Things like `IF(RANDBTWEEN(1, 500)> 200,A1, A2)` work fine Thnaks
- 8n4vidtmkvmk 2y agoWhat does that actually mean, "works"? I don't know how that behaves in Google sheets or Excel. Is it evaluated exactly once the first time the formula is entered? Every time you focus the input? Is the dice rerolled when a1 or a2 is modified? What?
- deleted 2y ago[deleted]
- nhatcher 2y agoHi 8n4vidtmkvmk, the algorithms for evaluating spreadsheets are surprisingly tricky mainly because of the dependencies. The dependencies are only know at runtime and in Excel are lazy evaluated. So things like `IF(condition, value1, value2)` would evaluate first the condition if it is true it will evaluate value1 but not value2. So things that in other programming languages are a circular dependency are not so in Excel. The problem of computing the dependencies might be solved by topological sort. The complication of the runtime dependencies is made worse by having dependencies that change every time (or that their outputs do not dependency solely of their inputs) like random functions or date functions. An optimization while evaluating a spreadsheet would be to only compute those cells that depend on cells whose value changed. If you do that you might miss on those volatile functions. I realize I am most likely babbling too much. Yes, volatile functions like RANDBETWEEN get evaluated each time a cell changes. They don't get evaluated when you focus on them.
- cultureulterior 2y agoIt's interesting that the Iron prefix means rust now. It used to mean .NET
- eointierney 2y agoCongratulations, this is awesome. One of those "why hasn't someone done this already?" projects. I can see this becoming transformative and superseding Excel, which is a bold claim to make. But this is compliant (with Excel), performant, extensible, free, and in-browser. This could easily become almost an emacs-level editor. Think of the interfaces that could be built to this in this? I'll be sharing this with every student I know. And the name is a winner.
- Aeolun 2y ago> One of those "why hasn't someone done this already?" projects. I think this one is fairly clear. It’s because it’s a massive amount of work with a not necessarily large payoff for yourself? I think some of these basically get made when someone gets too annoyed something similar doesn’t exist.
- mhh__ 2y agoWhy would there be any reason for this to kill excel? Seriously you should try to replace excel entirely rather than merely get a better version of it. If you want to get a better excel just buy excel and actually learn how to use it.
- nhatcher 2y agoWoah, thanks for the kind words! This is out of date, and not a priority ATM, but we will have a TUI for it: https://github.com/ironcalc/TironCalc https://github.com/ironcalc/TironCalc
- neoyagami 2y agoSudently I have the urge of adding this to my app report system
- mgkimsal 2y agoCan't tell by the docs (but I've not dug in much yet) but... @nhatcher... here's a use case question. Admins use the ironcalc UI to create their formulas. Is there a way to get those formulas to a backend and run the calcs on the server itself (separate from the user's browser) to get results based on input from other sources? The UI half looks great so far. I have a colleague I was going to recommend this to, but they more need the 'run the formulas on the server' part more than anything else. They've got some custom Rust stuff running already, but having admins come up with their advanced formulas, then translating that to server code - that takes the time. It seems they may be able to use this to have this handle both ends of the workload, without the translation layer. Is that something supported, or even feasible? Thanks!
- nhatcher 2y agoYes, IronCalc is first a spreadsheet engine. Meaning it is a library you can consume from Rust or Python without any UI.
- wuming2 2y agoIt’s a great ambition to replace Excel and many went down this path before. Congratulations to even attempting to achieve it and going this far to do it. Excel compatibility, when fully realized, will remove the major obstacle to adoption. Given the current stronghold Excel has on the market. Once that is achieved do you plan to offer a transition to more modern forms of calculations as vectors and arrays formula panels together with frozen sheets of raw data and output? Thus separating logic and model. Also when your solution adoption will have grown much larger you should learn from the experiences Bavaria and CERN went through. Microsoft stronghold more often than not has nothing to do with technical prowess.
- evanjrowley 2y ago>Also when your solution adoption will have grown much larger you should learn from the experiences Bavaria and CERN went through. Microsoft stronghold more often than not has nothing to do with technical prowess. Can you elaborate on those experiences?
- wuming2 2y agoThe government of Bavaria, one of the wealthiest countries of the German federation and thus of the world, tried to replace Microsoft with Linux and generally FOSS solutions. Twice. CERN tried to replace Office with NextCloud. It is now struggling to cope with a policy reversal under Microsoft fanboys. Both cases were also discussed here.
- nhatcher 2y agoYeah, that is not our battle. At least not right now. Excel, and Google sheets, are and will be far more advanced than IronCalc. What we can do is to cater different needs. The focus is on lightweight and open source. Given the billions of spreadsheets out there I wouldn't be surprised if for a small percentage of them IronCalc is a better option. The reason for Excel compatibility is twofold: * You can use your workbooks as the are * You don't need to learn a new tool > do you plan to offer a transition to more modern forms of calculations as vectors and arrays formula panels together with frozen sheets of raw data and output? So far, nothing beyond Excel's compatibility
- jvanderbot 2y agoProps on Rust not being mentioned here or on the index page.
- paradite 2y agoIn it's current form, how would I integrate the engine and UI in an existing software with, say Java backend and React front-end? I couldn't find docs on how to use it in languages other than rust. Perhaps via IPC?
- nhatcher 2y agoAt the time of writing, you can use Rust, Javascript and Python bindings. The React front-end communicates with wasm compiled from Rust. Java bindings are planed but not in the next ~6 months. A client/serve architecture (like libreoffice does) with IPC or sockets might be a good idea for languages that we don't provide bindings to. also not planned for the next 6 months
- paradite 2y ago> The React front-end communicates with wasm compiled from Rust. Just to clarify, this means that the entire engine is compiled into wasm and runs inside the browser? There is no server component?
- nhatcher 2y agoThe server: * Serves the files * Stores if you click share * Converts to xlsx if you download * Imports model The engine is fully compiled to wasm and run in the browser.
- phonon 2y agoHave you looked at these other somewhat similar Rust projects? https://github.com/logisky/LogiSheets https://github.com/logisky/LogiSheets https://github.com/natefduncan/excel-emulator https://github.com/natefduncan/excel-emulator https://github.com/jiradaherbst/XLFormula-Engine https://github.com/jiradaherbst/XLFormula-Engine https://github.com/omid/formula https://github.com/omid/formula https://crates.io/crates/df-web/0.1.28 https://crates.io/crates/df-web/0.1.28
- nhatcher 2y agoI _think_ I saw the XLFormula-Engine. At least the name rings a bell. I guess I have some reading to do! What is the last one?
- phonon 2y agoI'm not exactly sure...it seems to handle Excel files in some fashion. It came up when I looked through this https://crates.io/keywords/excel https://crates.io/keywords/excel
- openrisk 2y agoIs this similar to pysheets? From a quickscan it seems that its running client-side via rust/wasm but where are the data stored? Interesting to see all those different takes on the spreadsheet metaphor.
- nhatcher 2y agoThe data is stored in your browser's localStorage. I think the take is a tad different form pysheets. Cool tool though!
- snthpy 2y agoAwesome project! Looking forward to following this. I've been looking out for projects like this over the years and I'm glad to see that this one takes Excel compatibility seriously! Also love the choice of Rust and WASM! For me Dynamic Array support is a blocker and I can't play with it until you've got that. Very glad to see that's your top priority though[1]! That and everything in the Logical, Lookup and Reference, and Information sections (in that order). That covers probably over 95% of my work and I spend most of my time in Excel. 1: https://docs.ironcalc.com/ https://docs.ironcalc.com/
- snthpy 2y agoWhat would be quite cool would be a small utility that one can run over ones workooks and that produces a csv or json file of all the Excel functions used and their count. People could submit those and you'd get real usage stats of what functions people actually use in real world workbooks rather than guessing. Users could also then use this to run a compatibility check to see if they could move over to your engine or not.
- nhatcher 2y agoHi snthpy, that is planed! We used to have that, but I removed it to simplify the UI. If you don't mind compiling yourself there is a somewhat rough tool tat does that: https://github.com/ironcalc/IronCalc/blob/main/xlsx/src/bin/test.rs https://github.com/ironcalc/IronCalc/blob/main/xlsx/src/bin/... It will tell you exactly what cells evaluate differently. I will also add mentions to unsupported formulas and features
- nhatcher 2y agoThanks! Yes, that is exactly the top priority of the project right now.
- thezipcreator 2y agocool project, but I don't particularly like "The democratization of spreadsheets" as a catchphrase. Like, what does that even mean? If by "democratization" you mean like, more able to be used, well anyone can go download LibreOffice or for the web use CryptPad's Spreadsheets, and if you mean that it's more open, well both of those are open source. Is this project specifically run democratically or something? It just seems like a really bad use of meaningless marketing terminology.
- rizky05 2y agoThis reason met my definition of democratization: > Empowering SaaS Developers: Hundreds, if not thousands, of companies have implemented half-baked spreadsheets in their systems. IronCalc aims to provide these businesses with a superior, open-source alternative that enhances their SaaS applications. I am currently creating SAAS and the idea of implementing LibreOffice on top of my offering just not gonna work.
- icemelt8 2y agoBecause of your comment, I discovered OnlyOffice.
- homebrewer 2y agoI recommend you un-discover it and take a look at the Collabora office suite. It's basically the LibreOffice engine with a web ui on top. We've been using both OnlyOffice and CODE for years, and CODE has much better performance (both the client and the server; probably because the backend is in C++ instead of Node), it's more stable over the long term, and has better compatibility with msoffice. https://www.collaboraonline.com/code https://www.collaboraonline.com/code https://hub.docker.com/r/collabora/code https://hub.docker.com/r/collabora/code (it's FOSS, the language about "home use" is there to scare large companies into buying commercial versions with support contracts.)
- v3ss0n 2y agoOnlyoffice have a lot better compatibility .
- microflash 2y agoImpressive project. I’ve dealt with Excel a lot so anything new and ope source catches my attention. The docs currently focus on the engine part but I’m more interested in the integrations (for example, with Java, Angular, Vue etc). I’m currently on mobile but I’ll have to take a look at your React example to see if I can write a working Angular or Vue example.
- nhatcher 2y agoThe idea is to have an egine that is clearly separated from the various "skins" like a React, Vue, a TUI or a desktop app. At the moment the React component is a bit difficult to use in isolation. I need to provide a npm package that folks can install
- lovasoa 2y agoThis sounds like a cool project! Does anyone here knows how it compares to univerjs ? I currently use univerjs to power the open source sql spreadsheet component I work on (https://github.com/sqlpage/sqlpage-spreadsheet/ https://github.com/sqlpage/sqlpage-spreadsheet/). My experience with it has been that it's very powerful, but quite difficult to use due to the boilerplate involved, the lacking documentation, and the fact that it seems to be developed mainly for the Chinese market.
- nhatcher 2y agoWoah! I didn't realize luckysheets renamed to univerjs! I think at the time being you should stick to univerjs as it is a finalized product. Once we reach version 1.0, IronCalc should be easier to deal with and you cold consider using one or the other.
- anyfactor 2y agoI was an excel enthusiast and studied accounting mainly for Excel. Although I have moved to programming unlike most I still do think Excel is awesome. I sincerely commend the enthusiasm, but working in the industry as the "excel expert", I think most outsider does not understand the "cult" aspect of Excel. Excel works. That is it. Trying to replace excel with anything will be percieved as replacing a calculator with some alien substance that does math. Excel is like Pencil and Pen. You can not replace it. Excel is not software it is a tool. I have had my fair share backlash when trying to introduce replacement and complimentary tools. To replace excel, you not only need to advocate for it's usefulness and you need to be also be liable to the complaints from excel users. If anything goes wrong no how minor with the new tool, you are the one who introduced all these mess. So, in practice what usually happens is that, when people hit UX challenges they go to a consulting firm and commission a backoffice software to address the Excel limitations. Some business may pay for nocode but that is very rare. They go to backoffice software firm and they build a CRUD software that is now not replacing Excel but compliments it.
- deleted 2y ago[deleted]
- delusional 2y ago> So, in practice what usually happens is that, when people hit UX challenges they go to a consulting firm and commission a backoffice software to address the Excel limitations. Some business may pay for nocode but that is very rare. They go to backoffice software firm and they build a CRUD software that is now not replacing Excel but compliments it. Heh, where were you 6 month ago when my team was pitching some of our traders on replacing a system they'd built for balancing their strategy. It was built in excel of course, but what surprised me was the resistance to changing it at all. They all hated the thing, it was slow and crashed often, and right in the middle of the difficult part of the work too. Working with it was a terrible experience, even for people used to medium business enterprise crap. Yet they refused to consider any alternative to building some CRUD around it that would extract the worst parts. The issue we faced was that there was no way we could contribute to this excel monster while still following the risk tolerance of our department. It's not that we're opposed to building something that is probably a bad idea, if it helps build relationships that let us build something better later. It's more that as soon as IT touches it, we get to own every legal aspect of it too. So they ended up with an external consultant that built them what was essentially an external database they could query, which was then supplied with data by some program somewhere. It ended exactly as you say. They got a back-office firm to develop some one-off hack that alleviated the immediate problem, without replacing excel.
- inglor 2y agoWhen I worked at the Excel team our motto was Excel is the second best tool for everything. I'm excited to see more players in this space though, all the standards are open and there are decent libraries with decent licenses that exist. A lightweight LibreOffice alternative would be neat and something truly open source and embeddable (MIT) is great.
- jeremyscanvic 2y agoI was recently looking for a Linux alternative to LibreOffice Calc and couldn't find something that meets my needs (mostly CSV import/export, filtering and pivot tables). It's great to see this new contender showing up and even if it lacks major features what's there so far looks very good. This is promising! Congrats for the good work and best wishes for what's to come.
- majkinetor 2y agoGreat, very needed. Consider making formula engine standalone as it might be used in other contexts, like Markdown or html tables.
- afiodorov 2y agoI am quite excited about the new era of WASM webapps - those are cross-platform & fast. Unlike traditional desktop programs those are sand-boxed & unlike mobile apps the distribution channels are open ("side-loading" by default).
- fithisux 2y agoCalc and Dbeaver with DuckDb for me. If it compiles with Mingw, why not.
- HexDecOctBin 2y agoAny plans to add C bindings? Most other languages have a decent FFI story, and being usable from C will make it more universally usable.
- nhatcher 2y agoYeah, that should be pretty easy. I'm actually curious. I might try this soon
- sbenson246 2y agof
- epmoyer 2y agoI love it! - I think you should add a CHANGELOG.md, so people can see progress/features evolve (https://keepachangelog.com/en/1.1.0/ https://keepachangelog.com/en/1.1.0/) - I think you should report the rev somewhere. I can’t tell what the “current rev” is in GitHub or in the running demo. - The roadmap says what’s coming in 0.5 (October 2024), but it’s not clear whether 0.5 is “done” or if that’s what’s running on the demo site today. IronCalc would be awesome as an “embedded viewer” for data. I’m currently implementing an internal web app where I’d love to provide “monitoring” by just dumping a whole lot of transactional data from the db into a “live” IronCalc spreadsheet as a “view” tool that you could also do some data exploration in. The 0.5 roadmap says “API to set and read values from cells” but it’s not clear to me whether it would be possible or not to embed it today and inject data at “start” time from JS. The scope of the current docs is “using it as a spreadsheet” but they don’t cover “how to embed it / integrate it”. Love love LOVE! Would embed it TODAY as a data viewer could. :) Nice work! I am watching with bated breath!
- nhatcher 2y agoHi epmoyer. First things first, thanks!! Second, the project hit HN before I could actually release MVP version 0.5. But heck you know what they say about being proud of your product at the time of release. I will be working in coming weeks to make it easy to embed and use at the time being you would need a bit of plumbing and programming. You can use IronCalc as an "embedded viewer" but that is not were it shines. If you are not using Excel formulas there are many other lighter and simpler alternatives out there. There is currently a well defined API to set/read values from cells but you are right is not yet documented (on it's way). I is possible to have data from the start. I will add a CHANGELOG as soon as possible. I am still recovering from the huge impact this thread had. Thanks again for the kind words!
- epmoyer 2y agoAwesome! Yeah, I had an OpenSource Hardware project blow up on a tech site overnight before I was ready to launch and it was really weird navigating the next ~two months before it was actually ready to ship. I'm excited to follow along with your progress, and to embed it into something fun when it's ready for embedding :) Thanks for adding the changelog today! That will make it super easy for everyone to follow the progress. Cheers!