exceljs-formula-recalc 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +36 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -4,6 +4,32 @@ Recalculate formulas in an ExcelJS workbook without opening Excel, LibreOffice,
4
4
 
5
5
  ExcelJS can read and write formula cells, but it does not run an Excel-compatible calculation engine for you after backend code edits inputs. This package bridges that gap: serialize the ExcelJS workbook, run the Bilig WorkPaper recalculation path, optionally load the recalculated XLSX back into the same ExcelJS workbook, and read proof values.
6
6
 
7
+ ## If You Arrived From an ExcelJS Formula Issue
8
+
9
+ This package is for the recurring ExcelJS boundary behind issues and searches
10
+ like:
11
+
12
+ - `ExcelJS formula result not updating`
13
+ - `Formula based cell not updating`
14
+ - `Updating Formula Result`
15
+ - `Automatic formula calculation`
16
+ - `get computed value of Excel sheet cell in Node.js`
17
+
18
+ The important distinction is:
19
+
20
+ - `workbook.calcProperties.fullCalcOnLoad = true` asks Excel or LibreOffice to
21
+ recalculate later, when the file is opened.
22
+ - `exceljs-formula-recalc` recalculates before your Node process returns, then
23
+ patches requested ExcelJS formula cells with fresh `result` values.
24
+
25
+ Use ExcelJS for workbook I/O and presentation. Use this package only for the
26
+ calculation/readback boundary that ExcelJS intentionally does not own.
27
+
28
+ For a cross-library proof, run
29
+ [`examples/recalc-bridge-workflows`](../../examples/recalc-bridge-workflows).
30
+ It edits the same workbook through SheetJS/`xlsx`, `xlsx-populate`, and
31
+ ExcelJS, then verifies that Bilig refreshes the stale formula result.
32
+
7
33
  ## Install
8
34
 
9
35
  ```sh
@@ -56,6 +82,16 @@ await workbook.xlsx.writeFile('quote.recalculated.xlsx')
56
82
 
57
83
  By default, `recalculateExceljsWorkbook` mutates the provided ExcelJS workbook by loading the recalculated XLSX bytes back into it. For targets listed in `reads`, it also patches the ExcelJS formula cell object with the recalculated `result`, so backend code can inspect proof values without reopening the file. Pass `mutateWorkbook: false` if you only need the returned `xlsx` bytes.
58
84
 
85
+ ## Common Boundaries
86
+
87
+ | Job | Use |
88
+ | --------------------------------------------------------------- | -------------------------------------- |
89
+ | Create styled XLSX reports, worksheets, tables, images, or rows | ExcelJS |
90
+ | Ask Excel to recalculate after a human opens the file | ExcelJS `fullCalcOnLoad` |
91
+ | Read recalculated formula values before an API/job returns | `exceljs-formula-recalc` |
92
+ | Recalculate raw XLSX bytes from SheetJS or xlsx-populate | `xlsx-formula-recalc` |
93
+ | Keep formula-backed business state as JSON, not XLSX | `@bilig/headless` or `bilig-workpaper` |
94
+
59
95
  ## API
60
96
 
61
97
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exceljs-formula-recalc",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Recalculate ExcelJS XLSX workbook formulas in Node.js without Excel, LibreOffice, or browser automation.",
5
5
  "keywords": [
6
6
  "excel",
@@ -55,7 +55,7 @@
55
55
  "build": "pnpm --dir ../.. --filter xlsx-formula-recalc build && rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json"
56
56
  },
57
57
  "dependencies": {
58
- "xlsx-formula-recalc": "0.34.0"
58
+ "xlsx-formula-recalc": "0.35.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "exceljs": "4.4.0"