UPDATE: Adds Web browser wasm bindings (#30)
* UPDATE: Adds Web browser wasm bindings * FIX: install wasm-pack in the GitHub actions
This commit is contained in:
committed by
GitHub
parent
d445553d85
commit
489027991c
33
bindings/wasm/README.pkg.md
Normal file
33
bindings/wasm/README.pkg.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# IronCalc Web bindings
|
||||
|
||||
This package contains web bindings for IronCalc. Note that it does not contain the xlsx writer and reader, only the engine.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
In your project
|
||||
|
||||
```
|
||||
npm install @ironcalc/wasm
|
||||
```
|
||||
|
||||
And then in your TypeScript
|
||||
|
||||
```TypeScript
|
||||
import init, { Model } from "@ironcalc/wasm";
|
||||
|
||||
await init();
|
||||
|
||||
function compute() {
|
||||
const model = new Model('en', 'UTC');
|
||||
|
||||
model.setUserInput(0, 1, 1, "23");
|
||||
model.setUserInput(0, 1, 2, "=A1*3+1");
|
||||
|
||||
const result = model.getFormattedCellValue(0, 1, 2);
|
||||
|
||||
console.log("Result: ", result);
|
||||
}
|
||||
|
||||
compute();
|
||||
```
|
||||
Reference in New Issue
Block a user