@cj-tech-master/excelts 9.2.1 → 9.3.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.
- package/README.md +25 -2
- package/README_zh.md +29 -6
- package/dist/browser/index.browser.d.ts +1 -1
- package/dist/browser/index.browser.js +4 -0
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +4 -0
- package/dist/browser/modules/excel/cell.d.ts +17 -3
- package/dist/browser/modules/excel/cell.js +170 -22
- package/dist/browser/modules/excel/defined-names.d.ts +96 -1
- package/dist/browser/modules/excel/defined-names.js +411 -21
- package/dist/browser/modules/excel/image.d.ts +11 -0
- package/dist/browser/modules/excel/image.js +24 -1
- package/dist/browser/modules/excel/stream/workbook-reader.browser.d.ts +9 -3
- package/dist/browser/modules/excel/stream/workbook-reader.browser.js +14 -0
- package/dist/browser/modules/excel/stream/workbook-reader.d.ts +2 -1
- package/dist/browser/modules/excel/stream/workbook-writer.browser.d.ts +39 -5
- package/dist/browser/modules/excel/stream/workbook-writer.browser.js +48 -1
- package/dist/browser/modules/excel/stream/workbook-writer.d.ts +3 -2
- package/dist/browser/modules/excel/stream/worksheet-reader.js +17 -1
- package/dist/browser/modules/excel/stream/worksheet-writer.d.ts +39 -6
- package/dist/browser/modules/excel/stream/worksheet-writer.js +45 -5
- package/dist/browser/modules/excel/table.js +15 -2
- package/dist/browser/modules/excel/types.d.ts +133 -2
- package/dist/browser/modules/excel/utils/col-cache.d.ts +1 -0
- package/dist/browser/modules/excel/utils/col-cache.js +15 -0
- package/dist/browser/modules/excel/utils/drawing-utils.d.ts +3 -3
- package/dist/browser/modules/excel/utils/drawing-utils.js +4 -0
- package/dist/browser/modules/excel/utils/external-link-formula.d.ts +76 -0
- package/dist/browser/modules/excel/utils/external-link-formula.js +208 -0
- package/dist/browser/modules/excel/utils/iterate-stream.d.ts +9 -3
- package/dist/browser/modules/excel/utils/iterate-stream.js +3 -1
- package/dist/browser/modules/excel/utils/ooxml-paths.d.ts +19 -0
- package/dist/browser/modules/excel/utils/ooxml-paths.js +37 -2
- package/dist/browser/modules/excel/utils/shared-strings.d.ts +8 -3
- package/dist/browser/modules/excel/utils/shared-strings.js +21 -2
- package/dist/browser/modules/excel/utils/workbook-protection.d.ts +30 -0
- package/dist/browser/modules/excel/utils/workbook-protection.js +30 -0
- package/dist/browser/modules/excel/workbook.browser.d.ts +257 -6
- package/dist/browser/modules/excel/workbook.browser.js +318 -34
- package/dist/browser/modules/excel/workbook.d.ts +1 -1
- package/dist/browser/modules/excel/worksheet.d.ts +3 -1
- package/dist/browser/modules/excel/worksheet.js +21 -2
- package/dist/browser/modules/excel/xlsx/rel-type.d.ts +15 -0
- package/dist/browser/modules/excel/xlsx/rel-type.js +16 -1
- package/dist/browser/modules/excel/xlsx/xform/book/defined-name-xform.d.ts +6 -5
- package/dist/browser/modules/excel/xlsx/xform/book/defined-name-xform.js +21 -86
- package/dist/browser/modules/excel/xlsx/xform/book/external-link-xform.d.ts +84 -0
- package/dist/browser/modules/excel/xlsx/xform/book/external-link-xform.js +330 -0
- package/dist/browser/modules/excel/xlsx/xform/book/external-reference-xform.d.ts +17 -0
- package/dist/browser/modules/excel/xlsx/xform/book/external-reference-xform.js +24 -0
- package/dist/browser/modules/excel/xlsx/xform/book/workbook-calc-properties-xform.d.ts +3 -0
- package/dist/browser/modules/excel/xlsx/xform/book/workbook-calc-properties-xform.js +11 -2
- package/dist/browser/modules/excel/xlsx/xform/book/workbook-protection-xform.d.ts +20 -0
- package/dist/browser/modules/excel/xlsx/xform/book/workbook-protection-xform.js +66 -0
- package/dist/browser/modules/excel/xlsx/xform/book/workbook-xform.js +38 -5
- package/dist/browser/modules/excel/xlsx/xform/core/content-types-xform.js +19 -1
- package/dist/browser/modules/excel/xlsx/xform/core/metadata-xform.d.ts +56 -0
- package/dist/browser/modules/excel/xlsx/xform/core/metadata-xform.js +158 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.d.ts +26 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +105 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +3 -0
- package/dist/browser/modules/excel/xlsx/xform/drawing/drawing-xform.js +10 -2
- package/dist/browser/modules/excel/xlsx/xform/sheet/cell-xform.d.ts +1 -1
- package/dist/browser/modules/excel/xlsx/xform/sheet/cell-xform.js +166 -8
- package/dist/browser/modules/excel/xlsx/xform/sheet/data-validations-xform.js +1 -1
- package/dist/browser/modules/excel/xlsx/xform/sheet/ignored-errors-xform.d.ts +21 -0
- package/dist/browser/modules/excel/xlsx/xform/sheet/ignored-errors-xform.js +80 -0
- package/dist/browser/modules/excel/xlsx/xform/sheet/worksheet-xform.js +9 -4
- package/dist/browser/modules/excel/xlsx/xform/style/border-xform.js +4 -1
- package/dist/browser/modules/excel/xlsx/xlsx.browser.d.ts +172 -13
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +410 -20
- package/dist/browser/modules/excel/xlsx/xlsx.d.ts +7 -4
- package/dist/browser/modules/excel/xlsx/xlsx.js +4 -5
- package/dist/browser/modules/formula/compile/address-utils.d.ts +62 -0
- package/dist/browser/modules/formula/compile/address-utils.js +83 -0
- package/dist/browser/modules/formula/compile/binder.d.ts +42 -0
- package/dist/browser/modules/formula/compile/binder.js +487 -0
- package/dist/browser/modules/formula/compile/bound-ast.d.ts +230 -0
- package/dist/browser/modules/formula/compile/bound-ast.js +80 -0
- package/dist/browser/modules/formula/compile/compiled-formula.d.ts +137 -0
- package/dist/browser/modules/formula/compile/compiled-formula.js +383 -0
- package/dist/browser/modules/formula/compile/dependency-analysis.d.ts +93 -0
- package/dist/browser/modules/formula/compile/dependency-analysis.js +432 -0
- package/dist/browser/modules/formula/compile/structured-ref-utils.d.ts +93 -0
- package/dist/browser/modules/formula/compile/structured-ref-utils.js +136 -0
- package/dist/browser/modules/formula/default-syntax-probe.d.ts +79 -0
- package/dist/browser/modules/formula/default-syntax-probe.js +83 -0
- package/dist/browser/modules/formula/functions/_date-context.d.ts +4 -0
- package/dist/browser/modules/formula/functions/_date-context.js +29 -0
- package/dist/browser/modules/formula/functions/_shared.d.ts +121 -0
- package/dist/browser/modules/formula/functions/_shared.js +381 -0
- package/dist/browser/modules/formula/functions/conditional.d.ts +27 -0
- package/dist/browser/modules/formula/functions/conditional.js +343 -0
- package/dist/browser/modules/formula/functions/database.d.ts +37 -0
- package/dist/browser/modules/formula/functions/database.js +274 -0
- package/dist/browser/modules/formula/functions/date.d.ts +61 -0
- package/dist/browser/modules/formula/functions/date.js +855 -0
- package/dist/browser/modules/formula/functions/dynamic-array.d.ts +23 -0
- package/dist/browser/modules/formula/functions/dynamic-array.js +860 -0
- package/dist/browser/modules/formula/functions/engineering.d.ts +57 -0
- package/dist/browser/modules/formula/functions/engineering.js +1128 -0
- package/dist/browser/modules/formula/functions/financial.d.ts +202 -0
- package/dist/browser/modules/formula/functions/financial.js +2296 -0
- package/dist/browser/modules/formula/functions/lookup.d.ts +18 -0
- package/dist/browser/modules/formula/functions/lookup.js +886 -0
- package/dist/browser/modules/formula/functions/math.d.ts +114 -0
- package/dist/browser/modules/formula/functions/math.js +1406 -0
- package/dist/browser/modules/formula/functions/statistical.d.ts +193 -0
- package/dist/browser/modules/formula/functions/statistical.js +3390 -0
- package/dist/browser/modules/formula/functions/text.d.ts +86 -0
- package/dist/browser/modules/formula/functions/text.js +1845 -0
- package/dist/browser/modules/formula/host-registry.d.ts +53 -0
- package/dist/browser/modules/formula/host-registry.js +69 -0
- package/dist/browser/modules/formula/index.d.ts +39 -0
- package/dist/browser/modules/formula/index.js +49 -0
- package/dist/browser/modules/formula/install.d.ts +62 -0
- package/dist/browser/modules/formula/install.js +88 -0
- package/dist/browser/modules/formula/integration/apply-writeback-plan.d.ts +26 -0
- package/dist/browser/modules/formula/integration/apply-writeback-plan.js +210 -0
- package/dist/browser/modules/formula/integration/calculate-formulas-impl.d.ts +30 -0
- package/dist/browser/modules/formula/integration/calculate-formulas-impl.js +616 -0
- package/dist/browser/modules/formula/integration/calculate-formulas.d.ts +67 -0
- package/dist/browser/modules/formula/integration/calculate-formulas.js +68 -0
- package/dist/browser/modules/formula/integration/formula-instance.d.ts +64 -0
- package/dist/browser/modules/formula/integration/formula-instance.js +79 -0
- package/dist/browser/modules/formula/integration/workbook-adapter.d.ts +26 -0
- package/dist/browser/modules/formula/integration/workbook-adapter.js +324 -0
- package/dist/browser/modules/formula/integration/workbook-snapshot.d.ts +267 -0
- package/dist/browser/modules/formula/integration/workbook-snapshot.js +77 -0
- package/dist/browser/modules/formula/materialize/build-writeback-plan.d.ts +34 -0
- package/dist/browser/modules/formula/materialize/build-writeback-plan.js +473 -0
- package/dist/browser/modules/formula/materialize/spill-engine.d.ts +9 -0
- package/dist/browser/modules/formula/materialize/spill-engine.js +38 -0
- package/dist/browser/modules/formula/materialize/types.d.ts +179 -0
- package/dist/browser/modules/formula/materialize/types.js +29 -0
- package/dist/browser/modules/formula/materialize/writeback-plan.d.ts +167 -0
- package/dist/browser/modules/formula/materialize/writeback-plan.js +27 -0
- package/dist/browser/modules/formula/runtime/evaluator.d.ts +151 -0
- package/dist/browser/modules/formula/runtime/evaluator.js +2291 -0
- package/dist/browser/modules/formula/runtime/function-registry.d.ts +47 -0
- package/dist/browser/modules/formula/runtime/function-registry.js +840 -0
- package/dist/browser/modules/formula/runtime/values.d.ts +211 -0
- package/dist/browser/modules/formula/runtime/values.js +385 -0
- package/dist/browser/modules/formula/syntax/ast.d.ts +129 -0
- package/dist/browser/modules/formula/syntax/ast.js +28 -0
- package/dist/browser/modules/formula/syntax/parser.d.ts +18 -0
- package/dist/browser/modules/formula/syntax/parser.js +439 -0
- package/dist/browser/modules/formula/syntax/token-types.d.ts +153 -0
- package/dist/browser/modules/formula/syntax/token-types.js +59 -0
- package/dist/browser/modules/formula/syntax/tokenizer.d.ts +10 -0
- package/dist/browser/modules/formula/syntax/tokenizer.js +1074 -0
- package/dist/browser/modules/pdf/excel-bridge.js +9 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/modules/excel/cell.js +170 -22
- package/dist/cjs/modules/excel/defined-names.js +411 -21
- package/dist/cjs/modules/excel/image.js +24 -1
- package/dist/cjs/modules/excel/stream/workbook-reader.browser.js +14 -0
- package/dist/cjs/modules/excel/stream/workbook-writer.browser.js +48 -1
- package/dist/cjs/modules/excel/stream/worksheet-reader.js +17 -1
- package/dist/cjs/modules/excel/stream/worksheet-writer.js +45 -5
- package/dist/cjs/modules/excel/table.js +15 -2
- package/dist/cjs/modules/excel/utils/col-cache.js +15 -0
- package/dist/cjs/modules/excel/utils/drawing-utils.js +4 -0
- package/dist/cjs/modules/excel/utils/external-link-formula.js +212 -0
- package/dist/cjs/modules/excel/utils/iterate-stream.js +3 -1
- package/dist/cjs/modules/excel/utils/ooxml-paths.js +42 -2
- package/dist/cjs/modules/excel/utils/shared-strings.js +21 -2
- package/dist/cjs/modules/excel/utils/workbook-protection.js +33 -0
- package/dist/cjs/modules/excel/workbook.browser.js +318 -34
- package/dist/cjs/modules/excel/worksheet.js +20 -1
- package/dist/cjs/modules/excel/xlsx/rel-type.js +16 -1
- package/dist/cjs/modules/excel/xlsx/xform/book/defined-name-xform.js +21 -86
- package/dist/cjs/modules/excel/xlsx/xform/book/external-link-xform.js +333 -0
- package/dist/cjs/modules/excel/xlsx/xform/book/external-reference-xform.js +27 -0
- package/dist/cjs/modules/excel/xlsx/xform/book/workbook-calc-properties-xform.js +11 -2
- package/dist/cjs/modules/excel/xlsx/xform/book/workbook-protection-xform.js +69 -0
- package/dist/cjs/modules/excel/xlsx/xform/book/workbook-xform.js +38 -5
- package/dist/cjs/modules/excel/xlsx/xform/core/content-types-xform.js +18 -0
- package/dist/cjs/modules/excel/xlsx/xform/core/metadata-xform.js +161 -0
- package/dist/cjs/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +108 -0
- package/dist/cjs/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +3 -0
- package/dist/cjs/modules/excel/xlsx/xform/drawing/drawing-xform.js +10 -2
- package/dist/cjs/modules/excel/xlsx/xform/sheet/cell-xform.js +166 -8
- package/dist/cjs/modules/excel/xlsx/xform/sheet/data-validations-xform.js +1 -1
- package/dist/cjs/modules/excel/xlsx/xform/sheet/ignored-errors-xform.js +83 -0
- package/dist/cjs/modules/excel/xlsx/xform/sheet/worksheet-xform.js +9 -4
- package/dist/cjs/modules/excel/xlsx/xform/style/border-xform.js +4 -1
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +408 -18
- package/dist/cjs/modules/excel/xlsx/xlsx.js +4 -5
- package/dist/cjs/modules/formula/compile/address-utils.js +89 -0
- package/dist/cjs/modules/formula/compile/binder.js +489 -0
- package/dist/cjs/modules/formula/compile/bound-ast.js +68 -0
- package/dist/cjs/modules/formula/compile/compiled-formula.js +387 -0
- package/dist/cjs/modules/formula/compile/dependency-analysis.js +437 -0
- package/dist/cjs/modules/formula/compile/structured-ref-utils.js +141 -0
- package/dist/cjs/modules/formula/default-syntax-probe.js +87 -0
- package/dist/cjs/modules/formula/functions/_date-context.js +33 -0
- package/dist/cjs/modules/formula/functions/_shared.js +396 -0
- package/dist/cjs/modules/formula/functions/conditional.js +354 -0
- package/dist/cjs/modules/formula/functions/database.js +288 -0
- package/dist/cjs/modules/formula/functions/date.js +883 -0
- package/dist/cjs/modules/formula/functions/dynamic-array.js +881 -0
- package/dist/cjs/modules/formula/functions/engineering.js +1183 -0
- package/dist/cjs/modules/formula/functions/financial.js +2348 -0
- package/dist/cjs/modules/formula/functions/lookup.js +902 -0
- package/dist/cjs/modules/formula/functions/math.js +1487 -0
- package/dist/cjs/modules/formula/functions/statistical.js +3488 -0
- package/dist/cjs/modules/formula/functions/text.js +1889 -0
- package/dist/cjs/modules/formula/host-registry.js +75 -0
- package/dist/cjs/modules/formula/index.js +58 -0
- package/dist/cjs/modules/formula/install.js +93 -0
- package/dist/cjs/modules/formula/integration/apply-writeback-plan.js +213 -0
- package/dist/cjs/modules/formula/integration/calculate-formulas-impl.js +619 -0
- package/dist/cjs/modules/formula/integration/calculate-formulas.js +71 -0
- package/dist/cjs/modules/formula/integration/formula-instance.js +82 -0
- package/dist/cjs/modules/formula/integration/workbook-adapter.js +327 -0
- package/dist/cjs/modules/formula/integration/workbook-snapshot.js +84 -0
- package/dist/cjs/modules/formula/materialize/build-writeback-plan.js +475 -0
- package/dist/cjs/modules/formula/materialize/spill-engine.js +42 -0
- package/dist/cjs/modules/formula/materialize/types.js +32 -0
- package/dist/cjs/modules/formula/materialize/writeback-plan.js +28 -0
- package/dist/cjs/modules/formula/runtime/evaluator.js +2298 -0
- package/dist/cjs/modules/formula/runtime/function-registry.js +846 -0
- package/dist/cjs/modules/formula/runtime/values.js +385 -0
- package/dist/cjs/modules/formula/syntax/ast.js +8 -0
- package/dist/cjs/modules/formula/syntax/parser.js +440 -0
- package/dist/cjs/modules/formula/syntax/token-types.js +32 -0
- package/dist/cjs/modules/formula/syntax/tokenizer.js +1076 -0
- package/dist/cjs/modules/pdf/excel-bridge.js +9 -0
- package/dist/esm/index.browser.js +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/modules/excel/cell.js +170 -22
- package/dist/esm/modules/excel/defined-names.js +411 -21
- package/dist/esm/modules/excel/image.js +24 -1
- package/dist/esm/modules/excel/stream/workbook-reader.browser.js +14 -0
- package/dist/esm/modules/excel/stream/workbook-writer.browser.js +48 -1
- package/dist/esm/modules/excel/stream/worksheet-reader.js +17 -1
- package/dist/esm/modules/excel/stream/worksheet-writer.js +45 -5
- package/dist/esm/modules/excel/table.js +15 -2
- package/dist/esm/modules/excel/utils/col-cache.js +15 -0
- package/dist/esm/modules/excel/utils/drawing-utils.js +4 -0
- package/dist/esm/modules/excel/utils/external-link-formula.js +208 -0
- package/dist/esm/modules/excel/utils/iterate-stream.js +3 -1
- package/dist/esm/modules/excel/utils/ooxml-paths.js +37 -2
- package/dist/esm/modules/excel/utils/shared-strings.js +21 -2
- package/dist/esm/modules/excel/utils/workbook-protection.js +30 -0
- package/dist/esm/modules/excel/workbook.browser.js +318 -34
- package/dist/esm/modules/excel/worksheet.js +21 -2
- package/dist/esm/modules/excel/xlsx/rel-type.js +16 -1
- package/dist/esm/modules/excel/xlsx/xform/book/defined-name-xform.js +21 -86
- package/dist/esm/modules/excel/xlsx/xform/book/external-link-xform.js +330 -0
- package/dist/esm/modules/excel/xlsx/xform/book/external-reference-xform.js +24 -0
- package/dist/esm/modules/excel/xlsx/xform/book/workbook-calc-properties-xform.js +11 -2
- package/dist/esm/modules/excel/xlsx/xform/book/workbook-protection-xform.js +66 -0
- package/dist/esm/modules/excel/xlsx/xform/book/workbook-xform.js +38 -5
- package/dist/esm/modules/excel/xlsx/xform/core/content-types-xform.js +19 -1
- package/dist/esm/modules/excel/xlsx/xform/core/metadata-xform.js +158 -0
- package/dist/esm/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +105 -0
- package/dist/esm/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +3 -0
- package/dist/esm/modules/excel/xlsx/xform/drawing/drawing-xform.js +10 -2
- package/dist/esm/modules/excel/xlsx/xform/sheet/cell-xform.js +166 -8
- package/dist/esm/modules/excel/xlsx/xform/sheet/data-validations-xform.js +1 -1
- package/dist/esm/modules/excel/xlsx/xform/sheet/ignored-errors-xform.js +80 -0
- package/dist/esm/modules/excel/xlsx/xform/sheet/worksheet-xform.js +9 -4
- package/dist/esm/modules/excel/xlsx/xform/style/border-xform.js +4 -1
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +410 -20
- package/dist/esm/modules/excel/xlsx/xlsx.js +4 -5
- package/dist/esm/modules/formula/compile/address-utils.js +83 -0
- package/dist/esm/modules/formula/compile/binder.js +487 -0
- package/dist/esm/modules/formula/compile/bound-ast.js +80 -0
- package/dist/esm/modules/formula/compile/compiled-formula.js +383 -0
- package/dist/esm/modules/formula/compile/dependency-analysis.js +432 -0
- package/dist/esm/modules/formula/compile/structured-ref-utils.js +136 -0
- package/dist/esm/modules/formula/default-syntax-probe.js +83 -0
- package/dist/esm/modules/formula/functions/_date-context.js +29 -0
- package/dist/esm/modules/formula/functions/_shared.js +381 -0
- package/dist/esm/modules/formula/functions/conditional.js +343 -0
- package/dist/esm/modules/formula/functions/database.js +274 -0
- package/dist/esm/modules/formula/functions/date.js +855 -0
- package/dist/esm/modules/formula/functions/dynamic-array.js +860 -0
- package/dist/esm/modules/formula/functions/engineering.js +1128 -0
- package/dist/esm/modules/formula/functions/financial.js +2296 -0
- package/dist/esm/modules/formula/functions/lookup.js +886 -0
- package/dist/esm/modules/formula/functions/math.js +1406 -0
- package/dist/esm/modules/formula/functions/statistical.js +3390 -0
- package/dist/esm/modules/formula/functions/text.js +1845 -0
- package/dist/esm/modules/formula/host-registry.js +69 -0
- package/dist/esm/modules/formula/index.js +49 -0
- package/dist/esm/modules/formula/install.js +88 -0
- package/dist/esm/modules/formula/integration/apply-writeback-plan.js +210 -0
- package/dist/esm/modules/formula/integration/calculate-formulas-impl.js +616 -0
- package/dist/esm/modules/formula/integration/calculate-formulas.js +68 -0
- package/dist/esm/modules/formula/integration/formula-instance.js +79 -0
- package/dist/esm/modules/formula/integration/workbook-adapter.js +324 -0
- package/dist/esm/modules/formula/integration/workbook-snapshot.js +77 -0
- package/dist/esm/modules/formula/materialize/build-writeback-plan.js +473 -0
- package/dist/esm/modules/formula/materialize/spill-engine.js +38 -0
- package/dist/esm/modules/formula/materialize/types.js +29 -0
- package/dist/esm/modules/formula/materialize/writeback-plan.js +27 -0
- package/dist/esm/modules/formula/runtime/evaluator.js +2291 -0
- package/dist/esm/modules/formula/runtime/function-registry.js +840 -0
- package/dist/esm/modules/formula/runtime/values.js +385 -0
- package/dist/esm/modules/formula/syntax/ast.js +28 -0
- package/dist/esm/modules/formula/syntax/parser.js +439 -0
- package/dist/esm/modules/formula/syntax/token-types.js +59 -0
- package/dist/esm/modules/formula/syntax/tokenizer.js +1074 -0
- package/dist/esm/modules/pdf/excel-bridge.js +9 -0
- package/dist/iife/excelts.iife.js +2302 -373
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +34 -34
- package/dist/types/index.browser.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/modules/excel/cell.d.ts +17 -3
- package/dist/types/modules/excel/defined-names.d.ts +96 -1
- package/dist/types/modules/excel/image.d.ts +11 -0
- package/dist/types/modules/excel/stream/workbook-reader.browser.d.ts +9 -3
- package/dist/types/modules/excel/stream/workbook-reader.d.ts +2 -1
- package/dist/types/modules/excel/stream/workbook-writer.browser.d.ts +39 -5
- package/dist/types/modules/excel/stream/workbook-writer.d.ts +3 -2
- package/dist/types/modules/excel/stream/worksheet-writer.d.ts +39 -6
- package/dist/types/modules/excel/types.d.ts +133 -2
- package/dist/types/modules/excel/utils/col-cache.d.ts +1 -0
- package/dist/types/modules/excel/utils/drawing-utils.d.ts +3 -3
- package/dist/types/modules/excel/utils/external-link-formula.d.ts +76 -0
- package/dist/types/modules/excel/utils/iterate-stream.d.ts +9 -3
- package/dist/types/modules/excel/utils/ooxml-paths.d.ts +19 -0
- package/dist/types/modules/excel/utils/shared-strings.d.ts +8 -3
- package/dist/types/modules/excel/utils/workbook-protection.d.ts +30 -0
- package/dist/types/modules/excel/workbook.browser.d.ts +257 -6
- package/dist/types/modules/excel/workbook.d.ts +1 -1
- package/dist/types/modules/excel/worksheet.d.ts +3 -1
- package/dist/types/modules/excel/xlsx/rel-type.d.ts +15 -0
- package/dist/types/modules/excel/xlsx/xform/book/defined-name-xform.d.ts +6 -5
- package/dist/types/modules/excel/xlsx/xform/book/external-link-xform.d.ts +84 -0
- package/dist/types/modules/excel/xlsx/xform/book/external-reference-xform.d.ts +17 -0
- package/dist/types/modules/excel/xlsx/xform/book/workbook-calc-properties-xform.d.ts +3 -0
- package/dist/types/modules/excel/xlsx/xform/book/workbook-protection-xform.d.ts +20 -0
- package/dist/types/modules/excel/xlsx/xform/core/metadata-xform.d.ts +56 -0
- package/dist/types/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.d.ts +26 -0
- package/dist/types/modules/excel/xlsx/xform/sheet/cell-xform.d.ts +1 -1
- package/dist/types/modules/excel/xlsx/xform/sheet/ignored-errors-xform.d.ts +21 -0
- package/dist/types/modules/excel/xlsx/xlsx.browser.d.ts +172 -13
- package/dist/types/modules/excel/xlsx/xlsx.d.ts +7 -4
- package/dist/types/modules/formula/compile/address-utils.d.ts +62 -0
- package/dist/types/modules/formula/compile/binder.d.ts +42 -0
- package/dist/types/modules/formula/compile/bound-ast.d.ts +230 -0
- package/dist/types/modules/formula/compile/compiled-formula.d.ts +137 -0
- package/dist/types/modules/formula/compile/dependency-analysis.d.ts +93 -0
- package/dist/types/modules/formula/compile/structured-ref-utils.d.ts +93 -0
- package/dist/types/modules/formula/default-syntax-probe.d.ts +79 -0
- package/dist/types/modules/formula/functions/_date-context.d.ts +4 -0
- package/dist/types/modules/formula/functions/_shared.d.ts +121 -0
- package/dist/types/modules/formula/functions/conditional.d.ts +27 -0
- package/dist/types/modules/formula/functions/database.d.ts +37 -0
- package/dist/types/modules/formula/functions/date.d.ts +61 -0
- package/dist/types/modules/formula/functions/dynamic-array.d.ts +23 -0
- package/dist/types/modules/formula/functions/engineering.d.ts +57 -0
- package/dist/types/modules/formula/functions/financial.d.ts +202 -0
- package/dist/types/modules/formula/functions/lookup.d.ts +18 -0
- package/dist/types/modules/formula/functions/math.d.ts +114 -0
- package/dist/types/modules/formula/functions/statistical.d.ts +193 -0
- package/dist/types/modules/formula/functions/text.d.ts +86 -0
- package/dist/types/modules/formula/host-registry.d.ts +53 -0
- package/dist/types/modules/formula/index.d.ts +39 -0
- package/dist/types/modules/formula/install.d.ts +62 -0
- package/dist/types/modules/formula/integration/apply-writeback-plan.d.ts +26 -0
- package/dist/types/modules/formula/integration/calculate-formulas-impl.d.ts +30 -0
- package/dist/types/modules/formula/integration/calculate-formulas.d.ts +67 -0
- package/dist/types/modules/formula/integration/formula-instance.d.ts +64 -0
- package/dist/types/modules/formula/integration/workbook-adapter.d.ts +26 -0
- package/dist/types/modules/formula/integration/workbook-snapshot.d.ts +267 -0
- package/dist/types/modules/formula/materialize/build-writeback-plan.d.ts +34 -0
- package/dist/types/modules/formula/materialize/spill-engine.d.ts +9 -0
- package/dist/types/modules/formula/materialize/types.d.ts +179 -0
- package/dist/types/modules/formula/materialize/writeback-plan.d.ts +167 -0
- package/dist/types/modules/formula/runtime/evaluator.d.ts +151 -0
- package/dist/types/modules/formula/runtime/function-registry.d.ts +47 -0
- package/dist/types/modules/formula/runtime/values.d.ts +211 -0
- package/dist/types/modules/formula/syntax/ast.d.ts +129 -0
- package/dist/types/modules/formula/syntax/parser.d.ts +18 -0
- package/dist/types/modules/formula/syntax/token-types.d.ts +153 -0
- package/dist/types/modules/formula/syntax/tokenizer.d.ts +10 -0
- package/package.json +28 -28
|
@@ -22,15 +22,28 @@ export interface IParseStream extends EmitterLike {
|
|
|
22
22
|
pipe(dest: any): any;
|
|
23
23
|
[Symbol.asyncIterator]?: () => AsyncIterator<Uint8Array | string>;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Minimal write-side shape required to receive XLSX bytes. Anything that
|
|
27
|
+
* behaves like a Node `WritableStream` (a `write()` method plus `end()` and
|
|
28
|
+
* event emitter basics) satisfies this — including Node's `fs.WriteStream`,
|
|
29
|
+
* `PassThrough`, and our `@stream` Writable class.
|
|
30
|
+
*/
|
|
31
|
+
export interface IWritableStream extends EmitterLike {
|
|
32
|
+
write(data: string | Uint8Array): boolean | void | Promise<boolean>;
|
|
27
33
|
end(): void;
|
|
28
|
-
read(): any;
|
|
29
|
-
toBuffer?(): any;
|
|
30
34
|
pipe?(dest: any): any;
|
|
31
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* An in-memory buffered stream. Extends the write-side shape with `read()`
|
|
38
|
+
* and optional `toBuffer()` for callers that use the stream as a sink and
|
|
39
|
+
* then harvest the accumulated bytes (e.g. `writeBuffer()`'s internal buffer).
|
|
40
|
+
*/
|
|
41
|
+
export interface IStreamBuf extends IWritableStream {
|
|
42
|
+
read(): Uint8Array | null;
|
|
43
|
+
toBuffer?(): Uint8Array | null;
|
|
44
|
+
}
|
|
32
45
|
export interface IZipWriter extends EmitterLike {
|
|
33
|
-
append(data:
|
|
46
|
+
append(data: string | Uint8Array, options: {
|
|
34
47
|
name: string;
|
|
35
48
|
base64?: boolean;
|
|
36
49
|
}): void;
|
|
@@ -39,13 +52,46 @@ export interface IZipWriter extends EmitterLike {
|
|
|
39
52
|
write(chunk: string): void;
|
|
40
53
|
end(): void;
|
|
41
54
|
};
|
|
42
|
-
pipe(stream:
|
|
55
|
+
pipe(stream: IWritableStream): void;
|
|
43
56
|
finalize(): void;
|
|
44
57
|
/** Wait for downstream backpressure to clear. Resolves immediately if no backpressure. */
|
|
45
58
|
waitForDrain(): Promise<void>;
|
|
46
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Options for reading (loading) an XLSX workbook.
|
|
62
|
+
*
|
|
63
|
+
* All officially supported options are declared below with proper types so
|
|
64
|
+
* callers get IDE completion and type-checking. Additional fields are
|
|
65
|
+
* permitted via the index signature for forward compatibility and for
|
|
66
|
+
* callers who subclass `XLSX` to pass through private flags.
|
|
67
|
+
*/
|
|
47
68
|
export interface XlsxReadOptions {
|
|
69
|
+
/**
|
|
70
|
+
* When the input to `load()` is a string, interpret it as a base64-encoded
|
|
71
|
+
* zip archive instead of a binary buffer. Defaults to `false`.
|
|
72
|
+
*/
|
|
48
73
|
base64?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Maximum number of rows to parse from each worksheet. Rows beyond this
|
|
76
|
+
* limit are silently skipped. Useful for previewing very large sheets
|
|
77
|
+
* without loading everything into memory.
|
|
78
|
+
*/
|
|
79
|
+
maxRows?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Maximum number of columns to parse from each worksheet. Columns beyond
|
|
82
|
+
* this limit are silently skipped. Useful for previewing very wide sheets.
|
|
83
|
+
*/
|
|
84
|
+
maxCols?: number;
|
|
85
|
+
/**
|
|
86
|
+
* List of worksheet XML node names to skip while parsing (e.g.
|
|
87
|
+
* `"dataValidations"`, `"conditionalFormatting"`). Use for workbooks that
|
|
88
|
+
* contain corrupted or unsupported elements you want to ignore.
|
|
89
|
+
*/
|
|
90
|
+
ignoreNodes?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* Forward-compatibility / subclass extension escape hatch. Unknown keys are
|
|
93
|
+
* passed through to internal loaders; unrecognised keys are ignored.
|
|
94
|
+
*/
|
|
49
95
|
[key: string]: unknown;
|
|
50
96
|
}
|
|
51
97
|
export interface ZipWriterOptions {
|
|
@@ -55,8 +101,33 @@ export interface ZipWriterOptions {
|
|
|
55
101
|
/** Timestamp writing strategy for ZIP entry metadata (optional). */
|
|
56
102
|
timestamps?: ZipTimestampMode;
|
|
57
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Options for writing an XLSX workbook.
|
|
106
|
+
*
|
|
107
|
+
* All officially supported options are declared below with proper types so
|
|
108
|
+
* callers get IDE completion and type-checking. Additional fields are
|
|
109
|
+
* permitted via the index signature for forward compatibility and for
|
|
110
|
+
* callers who subclass `XLSX` to pass through private flags.
|
|
111
|
+
*/
|
|
58
112
|
export interface XlsxWriteOptions {
|
|
113
|
+
/** ZIP archive options (compression level, timestamps, ...). */
|
|
59
114
|
zip?: ZipWriterOptions;
|
|
115
|
+
/**
|
|
116
|
+
* Use a shared-string table for cell text values. Defaults to `true`.
|
|
117
|
+
* Set to `false` to write string values inline (larger file, but streams
|
|
118
|
+
* better for very large sheets).
|
|
119
|
+
*/
|
|
120
|
+
useSharedStrings?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Emit style definitions (fonts, fills, borders, number formats, …).
|
|
123
|
+
* Defaults to `true`. Set to `false` to skip style blocks for maximum
|
|
124
|
+
* compatibility with minimal readers.
|
|
125
|
+
*/
|
|
126
|
+
useStyles?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Forward-compatibility / subclass extension escape hatch. Unknown keys are
|
|
129
|
+
* passed through to internal writers; unrecognised keys are ignored.
|
|
130
|
+
*/
|
|
60
131
|
[key: string]: unknown;
|
|
61
132
|
}
|
|
62
133
|
export type XlsxOptions = XlsxReadOptions & XlsxWriteOptions;
|
|
@@ -73,7 +144,7 @@ export interface MediaModel {
|
|
|
73
144
|
}
|
|
74
145
|
interface ZipEntryLike {
|
|
75
146
|
name: string;
|
|
76
|
-
type: "Directory" | "File";
|
|
147
|
+
type: "Directory" | "File" | "Symlink";
|
|
77
148
|
stream: IParseStream;
|
|
78
149
|
drain: () => Promise<void>;
|
|
79
150
|
}
|
|
@@ -102,6 +173,9 @@ declare class XLSX {
|
|
|
102
173
|
PivotTable: string;
|
|
103
174
|
FeaturePropertyBag: string;
|
|
104
175
|
CtrlProp: string;
|
|
176
|
+
SheetMetadata: string;
|
|
177
|
+
ExternalLink: string;
|
|
178
|
+
ExternalLinkPath: string;
|
|
105
179
|
};
|
|
106
180
|
constructor(workbook: Workbook);
|
|
107
181
|
/**
|
|
@@ -133,19 +207,28 @@ declare class XLSX {
|
|
|
133
207
|
/**
|
|
134
208
|
* Read workbook from a stream
|
|
135
209
|
*/
|
|
136
|
-
read(stream: IParseStream, options?: XlsxReadOptions): Promise<
|
|
210
|
+
read(stream: IParseStream, options?: XlsxReadOptions): Promise<Workbook>;
|
|
137
211
|
/**
|
|
138
212
|
* Write workbook to a stream
|
|
139
213
|
*/
|
|
140
|
-
write(stream:
|
|
214
|
+
write(stream: IWritableStream, options?: XlsxWriteOptions): Promise<XLSX>;
|
|
141
215
|
/**
|
|
142
|
-
* Load workbook from
|
|
216
|
+
* Load a workbook from binary data.
|
|
217
|
+
*
|
|
218
|
+
* Accepted inputs:
|
|
219
|
+
* - `Uint8Array` (and `Buffer`, which is a Uint8Array at runtime)
|
|
220
|
+
* - `ArrayBuffer` / `SharedArrayBuffer`
|
|
221
|
+
* - Any `ArrayBufferView` (DataView, Int8Array, Float32Array, …) — the
|
|
222
|
+
* underlying bytes are reinterpreted as a zip archive
|
|
223
|
+
* - `string` — treated as base64-encoded data when `options.base64 === true`;
|
|
224
|
+
* raw binary cannot be round-tripped through a JS string and is rejected
|
|
225
|
+
* to prevent silent corruption.
|
|
143
226
|
*/
|
|
144
|
-
load(data:
|
|
227
|
+
load(data: Uint8Array | ArrayBuffer | ArrayBufferView | string, options?: XlsxReadOptions): Promise<Workbook>;
|
|
145
228
|
/**
|
|
146
229
|
* Internal: Load from Uint8Array buffer
|
|
147
230
|
*/
|
|
148
|
-
protected loadBuffer(buffer: Uint8Array, options?: XlsxReadOptions): Promise<
|
|
231
|
+
protected loadBuffer(buffer: Uint8Array, options?: XlsxReadOptions): Promise<Workbook>;
|
|
149
232
|
/**
|
|
150
233
|
* Internal: Load workbook from an async stream of ZIP entries.
|
|
151
234
|
*
|
|
@@ -194,6 +277,53 @@ declare class XLSX {
|
|
|
194
277
|
parseWorkbook(stream: IParseStream): Promise<any>;
|
|
195
278
|
parseSharedStrings(stream: IParseStream): Promise<any>;
|
|
196
279
|
reconcile(model: any, options?: XlsxOptions): void;
|
|
280
|
+
/**
|
|
281
|
+
* Join the three on-disk sources that together describe external workbook
|
|
282
|
+
* references into a single dense `model.externalLinks: ExternalLinkModel[]`.
|
|
283
|
+
*
|
|
284
|
+
* Sources:
|
|
285
|
+
* - `<externalReferences>` list in workbook.xml (declaration order)
|
|
286
|
+
* - `xl/_rels/workbook.xml.rels` (rId → internal path)
|
|
287
|
+
* - `xl/externalLinks/externalLink{N}.xml` (sheet names, cached values)
|
|
288
|
+
* - `xl/externalLinks/_rels/externalLink{N}.xml.rels` (target, TargetMode)
|
|
289
|
+
*
|
|
290
|
+
* The 1-based index of each resulting ExternalLinkModel matches the `[N]`
|
|
291
|
+
* used in formula strings — this is the single source of truth formula
|
|
292
|
+
* code should rely on.
|
|
293
|
+
*/
|
|
294
|
+
protected _reconcileExternalLinks(model: any): void;
|
|
295
|
+
/**
|
|
296
|
+
* Write-time pass that brings the workbook model into a shape the writer
|
|
297
|
+
* can serialise cleanly. Two concerns:
|
|
298
|
+
*
|
|
299
|
+
* 1. Build the final external-link list for this write, combining
|
|
300
|
+
* user-declared links (`wb.externalLinks`) with auto-discovered
|
|
301
|
+
* ones from previous writes (cached on the Workbook). The result
|
|
302
|
+
* is assigned to `model.externalLinks` and consumed by the writer;
|
|
303
|
+
* `wb.externalLinks` is **not** modified.
|
|
304
|
+
*
|
|
305
|
+
* 2. Scan every formula cell for `[Book]Sheet!` prefixes. Filename-form
|
|
306
|
+
* references that don't match an existing link trigger
|
|
307
|
+
* `_recordAutoExternalLink()` on the Workbook, which adds the target
|
|
308
|
+
* to the private writer cache (so subsequent writes are fixed-point
|
|
309
|
+
* stable) but leaves `wb.externalLinks` untouched.
|
|
310
|
+
*
|
|
311
|
+
* 3. Rewrite every external-ref formula so it uses the numeric `[N]`
|
|
312
|
+
* form, the canonical OOXML storage form. This mutation lands on
|
|
313
|
+
* the cell's model object — matching the library's existing
|
|
314
|
+
* write-time pattern for `ssId`, `styleId`, `si`, and `cm`.
|
|
315
|
+
* Subsequent writes see the `[N]` form directly and resolve it
|
|
316
|
+
* against `model.externalLinks`, giving idempotent output.
|
|
317
|
+
*/
|
|
318
|
+
protected _normaliseExternalLinks(model: any): void;
|
|
319
|
+
/**
|
|
320
|
+
* Rewrite a single formula so every external-ref prefix uses the numeric
|
|
321
|
+
* `[N]` form. When an unknown filename-form reference is found we record
|
|
322
|
+
* it on the workbook's private writer cache (so the next write can still
|
|
323
|
+
* resolve it) and append a local link to `scratch.links` so subsequent
|
|
324
|
+
* refs in the same formula see the freshly-assigned index.
|
|
325
|
+
*/
|
|
326
|
+
private _normaliseFormulaExternalRefs;
|
|
197
327
|
/**
|
|
198
328
|
* Reconcile pivot tables by linking them to worksheets and their cache data.
|
|
199
329
|
*/
|
|
@@ -229,7 +359,21 @@ declare class XLSX {
|
|
|
229
359
|
_processPivotTableRelsEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
|
230
360
|
_processPivotCacheDefinitionEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
|
231
361
|
_processPivotCacheRecordsEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
|
232
|
-
|
|
362
|
+
/**
|
|
363
|
+
* Parse `xl/externalLinks/externalLink{N}.xml` into the intermediate
|
|
364
|
+
* ParsedExternalLink shape. Reconciliation (joining with the rels file
|
|
365
|
+
* and the workbook's `<externalReferences>` list) happens later in
|
|
366
|
+
* {@link reconcile}.
|
|
367
|
+
*/
|
|
368
|
+
_processExternalLinkEntry(stream: IParseStream, model: any, index: number): Promise<void>;
|
|
369
|
+
/**
|
|
370
|
+
* Parse `xl/externalLinks/_rels/externalLink{N}.xml.rels`. The Target /
|
|
371
|
+
* TargetMode carried here is what Excel uses to locate the actual external
|
|
372
|
+
* file at open time, so we must preserve it verbatim (including relative
|
|
373
|
+
* paths like `"测试.xlsx"`).
|
|
374
|
+
*/
|
|
375
|
+
_processExternalLinkRelsEntry(stream: IParseStream, model: any, index: number): Promise<void>;
|
|
376
|
+
loadFromFiles(zipData: Record<string, Uint8Array>, options?: XlsxReadOptions): Promise<Workbook>;
|
|
233
377
|
/**
|
|
234
378
|
* Process default entries (drawings, comments, tables, etc.)
|
|
235
379
|
* @param rawData Optional raw entry data for passthrough preservation (used by loadFromFiles)
|
|
@@ -253,12 +397,27 @@ declare class XLSX {
|
|
|
253
397
|
addOfficeRels(zip: IZipWriter, _model: any): Promise<void>;
|
|
254
398
|
addWorkbookRels(zip: IZipWriter, model: any): Promise<void>;
|
|
255
399
|
addFeaturePropertyBag(zip: IZipWriter, model: any): Promise<void>;
|
|
400
|
+
addMetadata(zip: IZipWriter, model: any): Promise<void>;
|
|
256
401
|
addSharedStrings(zip: IZipWriter, model: any): Promise<void>;
|
|
257
402
|
addStyles(zip: IZipWriter, model: any): Promise<void>;
|
|
258
403
|
addWorkbook(zip: IZipWriter, model: any): Promise<void>;
|
|
259
404
|
addWorksheets(zip: IZipWriter, model: any): Promise<void>;
|
|
260
405
|
addDrawings(zip: IZipWriter, model: any): Promise<void>;
|
|
261
406
|
addTables(zip: IZipWriter, model: any): Promise<void>;
|
|
407
|
+
/**
|
|
408
|
+
* Write every external workbook reference into the archive. For each
|
|
409
|
+
* {@link ExternalLinkModel} in `model.externalLinks` we emit two files:
|
|
410
|
+
*
|
|
411
|
+
* xl/externalLinks/externalLink{index}.xml — sheet names + cache
|
|
412
|
+
* xl/externalLinks/_rels/externalLink{index}.xml.rels — target path
|
|
413
|
+
*
|
|
414
|
+
* The target-path rel carries `TargetMode="External"` with a **bare
|
|
415
|
+
* relative** `Target` whenever the user supplied one. This is the single
|
|
416
|
+
* line that makes Office / WPS resolve the referenced workbook relative
|
|
417
|
+
* to the current file's directory (not the `%USERPROFILE%\Documents`
|
|
418
|
+
* fallback) — the root of the behaviour reported in exceljs#3039.
|
|
419
|
+
*/
|
|
420
|
+
addExternalLinks(zip: IZipWriter, model: any): Promise<void>;
|
|
262
421
|
/**
|
|
263
422
|
* Write passthrough files (charts, etc.) that were preserved during read.
|
|
264
423
|
* These files are written back unchanged to preserve unsupported features.
|