add model.evaluate() call

This commit is contained in:
Matt Lehrer
2025-08-09 21:57:05 +02:00
committed by Nicolás Hatcher Andrés
parent c1c43143cc
commit 3e9c69f122

View File

@@ -4,14 +4,19 @@
Example usage: Example usage:
```javascript ```javascript
import { Model } from '@ironcalc/wasm'; import { Model } from '@ironcalc/nodejs';
const model = new Model("Workbook1", "en", "UTC"); const model = new Model("Workbook1", "en", "UTC");
model.setUserInput(0, 1, 1, "=1+1"); model.setUserInput(0, 1, 1, "=1+1");
const result1 = model.getFormattedCellValue(0, 1, 1);
console.log('Cell value', result1); const result1 = model.getFormattedCellValue(0, 1, 1);
console.log('Cell value', result1); // "#ERROR"
model.evaluate();
const resultAfterEvaluate = model.getFormattedCellValue(0, 1, 1);
console.log('Cell value', resultAfterEvaluate); // 2
let result2 = model.getCellStyle(0, 1, 1); let result2 = model.getCellStyle(0, 1, 1);
console.log('Cell style', result2); console.log('Cell style', result2);