ironcalc / IronCalc

Main engine of the IronCalc ecosystem
Apache License 2.0
2.1k stars 51 forks source link

Embedding and extending IronCalc #65

Open nhatcher opened 7 months ago

nhatcher commented 7 months ago

At this point this is a project research

Extending IronCalc is adding new features or abilities or functions to IronCalc. We want IronCalc to be extremely hackable and adaptable to other people's necesities. The most notable example would be adding a new spreadsheet function. Other examples might be, connection to a database (sqlite?).

Embedding means calling IronCalc from other sources. Because we already have an API that's easily done from languages like Python. The prime example here in my mind is an scripting language like Lua that would do a similar job as VBA

declann commented 3 weeks ago

+1 for embedding in Javascript, which would be a nice path to interactive UIs that use calculations that are defined in IronCalc. Considering rust/wasm, I guest this should be reasonable and fast.

jamesarosen commented 2 weeks ago

Does @ironcalc/wasm resolve the JavaScript embedding? Or are you looking for the spreadsheet UI as a JavaScript library? Or something else?

declann commented 2 weeks ago

The wasm package looks great but you must make many engine api calls to re-build a non-trivial spreadsheet programatically. Generally I'd like to be able to make something in ironcalc and call it from JS programatically, using custom engine calls to change inputs and recalculate.

Load support in the wasm package or alternatively an Export from ironcalc that lists engine api calls which rebuild its cells would suffice (export to mjs?).

My goal is to make some ironcalc spreadsheets, then run them many times in JS (including with different changes) and understand performance of the rust engine. I can also make interactive UIs that interact with spreadsheet calculations at that point (I make many, see examples on calculang.dev).