@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic Array Functions — Native RuntimeValue Implementation
|
|
3
|
+
*/
|
|
4
|
+
import type { RuntimeValue } from "../runtime/values.js";
|
|
5
|
+
export declare function fnFILTER(args: RuntimeValue[]): RuntimeValue;
|
|
6
|
+
export declare function fnSORT(args: RuntimeValue[]): RuntimeValue;
|
|
7
|
+
export declare function fnUNIQUE(args: RuntimeValue[]): RuntimeValue;
|
|
8
|
+
export declare function fnSORTBY(args: RuntimeValue[]): RuntimeValue;
|
|
9
|
+
export declare function fnSUBTOTAL(args: RuntimeValue[]): RuntimeValue;
|
|
10
|
+
export declare function fnAGGREGATE(args: RuntimeValue[]): RuntimeValue;
|
|
11
|
+
export declare function fnSEQUENCE(args: RuntimeValue[]): RuntimeValue;
|
|
12
|
+
export declare function fnRANDARRAY(args: RuntimeValue[]): RuntimeValue;
|
|
13
|
+
export declare function fnTOCOL(args: RuntimeValue[]): RuntimeValue;
|
|
14
|
+
export declare function fnTOROW(args: RuntimeValue[]): RuntimeValue;
|
|
15
|
+
export declare function fnCHOOSEROWS(args: RuntimeValue[]): RuntimeValue;
|
|
16
|
+
export declare function fnCHOOSECOLS(args: RuntimeValue[]): RuntimeValue;
|
|
17
|
+
export declare function fnVSTACK(args: RuntimeValue[]): RuntimeValue;
|
|
18
|
+
export declare function fnHSTACK(args: RuntimeValue[]): RuntimeValue;
|
|
19
|
+
export declare function fnTAKE(args: RuntimeValue[]): RuntimeValue;
|
|
20
|
+
export declare function fnDROP(args: RuntimeValue[]): RuntimeValue;
|
|
21
|
+
export declare function fnWRAPROWS(args: RuntimeValue[]): RuntimeValue;
|
|
22
|
+
export declare function fnWRAPCOLS(args: RuntimeValue[]): RuntimeValue;
|
|
23
|
+
export declare function fnEXPAND(args: RuntimeValue[]): RuntimeValue;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Engineering Functions — Native RuntimeValue implementation.
|
|
3
|
+
*/
|
|
4
|
+
import type { RuntimeValue } from "../runtime/values.js";
|
|
5
|
+
type NativeFn = (args: RuntimeValue[]) => RuntimeValue;
|
|
6
|
+
export declare const fnBIN2DEC: NativeFn;
|
|
7
|
+
export declare const fnDEC2BIN: NativeFn;
|
|
8
|
+
export declare const fnHEX2DEC: NativeFn;
|
|
9
|
+
export declare const fnDEC2HEX: NativeFn;
|
|
10
|
+
export declare const fnOCT2DEC: NativeFn;
|
|
11
|
+
export declare const fnDEC2OCT: NativeFn;
|
|
12
|
+
export declare const fnBIN2HEX: NativeFn;
|
|
13
|
+
export declare const fnBIN2OCT: NativeFn;
|
|
14
|
+
export declare const fnHEX2BIN: NativeFn;
|
|
15
|
+
export declare const fnHEX2OCT: NativeFn;
|
|
16
|
+
export declare const fnOCT2BIN: NativeFn;
|
|
17
|
+
export declare const fnOCT2HEX: NativeFn;
|
|
18
|
+
export declare const fnBESSELJ: NativeFn;
|
|
19
|
+
export declare const fnBESSELI: NativeFn;
|
|
20
|
+
export declare const fnBESSELK: NativeFn;
|
|
21
|
+
export declare const fnBESSELY: NativeFn;
|
|
22
|
+
export declare const fnDELTA: NativeFn;
|
|
23
|
+
export declare const fnGESTEP: NativeFn;
|
|
24
|
+
export declare const fnCOMPLEX: NativeFn;
|
|
25
|
+
export declare const fnIMREAL: NativeFn;
|
|
26
|
+
export declare const fnIMAGINARY: NativeFn;
|
|
27
|
+
export declare const fnIMABS: NativeFn;
|
|
28
|
+
export declare const fnIMARGUMENT: NativeFn;
|
|
29
|
+
export declare const fnIMCONJUGATE: NativeFn;
|
|
30
|
+
export declare const fnIMSUM: NativeFn;
|
|
31
|
+
export declare const fnIMSUB: NativeFn;
|
|
32
|
+
export declare const fnIMPRODUCT: NativeFn;
|
|
33
|
+
export declare const fnIMDIV: NativeFn;
|
|
34
|
+
export declare const fnIMPOWER: NativeFn;
|
|
35
|
+
export declare const fnIMSQRT: NativeFn;
|
|
36
|
+
export declare const fnIMLN: NativeFn;
|
|
37
|
+
export declare const fnIMLOG2: NativeFn;
|
|
38
|
+
export declare const fnIMLOG10: NativeFn;
|
|
39
|
+
export declare const fnIMEXP: NativeFn;
|
|
40
|
+
export declare const fnIMSIN: NativeFn;
|
|
41
|
+
export declare const fnIMCOS: NativeFn;
|
|
42
|
+
export declare const fnIMTAN: NativeFn;
|
|
43
|
+
export declare const fnIMCSC: NativeFn;
|
|
44
|
+
export declare const fnIMSEC: NativeFn;
|
|
45
|
+
export declare const fnIMCOT: NativeFn;
|
|
46
|
+
export declare const fnIMSINH: NativeFn;
|
|
47
|
+
export declare const fnIMCOSH: NativeFn;
|
|
48
|
+
export declare const fnIMTANH: NativeFn;
|
|
49
|
+
export declare const fnIMCSCH: NativeFn;
|
|
50
|
+
export declare const fnIMSECH: NativeFn;
|
|
51
|
+
export declare const fnIMCOTH: NativeFn;
|
|
52
|
+
export declare const fnBITAND: NativeFn;
|
|
53
|
+
export declare const fnBITOR: NativeFn;
|
|
54
|
+
export declare const fnBITXOR: NativeFn;
|
|
55
|
+
export declare const fnBITLSHIFT: NativeFn;
|
|
56
|
+
export declare const fnBITRSHIFT: NativeFn;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Financial Functions — Native RuntimeValue implementation.
|
|
3
|
+
*/
|
|
4
|
+
import type { RuntimeValue } from "../runtime/values.js";
|
|
5
|
+
type NativeFn = (args: RuntimeValue[]) => RuntimeValue;
|
|
6
|
+
export declare const fnPMT: NativeFn;
|
|
7
|
+
export declare const fnFV: NativeFn;
|
|
8
|
+
export declare const fnPV: NativeFn;
|
|
9
|
+
export declare const fnNPV: NativeFn;
|
|
10
|
+
export declare const fnIRR: NativeFn;
|
|
11
|
+
export declare const fnNPER: NativeFn;
|
|
12
|
+
export declare const fnRATE: NativeFn;
|
|
13
|
+
export declare const fnSLN: NativeFn;
|
|
14
|
+
/**
|
|
15
|
+
* SYD — Sum-of-years'-digits depreciation.
|
|
16
|
+
*
|
|
17
|
+
* SYD(cost, salvage, life, per)
|
|
18
|
+
*
|
|
19
|
+
* The depreciation assigned to period `per` by the sum-of-years'-digits
|
|
20
|
+
* method: `(cost - salvage) * (life - per + 1) * 2 / (life * (life + 1))`.
|
|
21
|
+
* Excel rejects `life = 0` and period outside [1, life] with #NUM!.
|
|
22
|
+
*/
|
|
23
|
+
export declare const fnSYD: NativeFn;
|
|
24
|
+
/**
|
|
25
|
+
* VDB — Variable Declining Balance depreciation.
|
|
26
|
+
*
|
|
27
|
+
* VDB(cost, salvage, life, start_period, end_period, [factor], [no_switch])
|
|
28
|
+
*
|
|
29
|
+
* Applies declining-balance depreciation (with a default factor of 2
|
|
30
|
+
* for double-declining) between two fractional periods. By default
|
|
31
|
+
* (`no_switch = FALSE`) the method silently switches to straight-line
|
|
32
|
+
* when that yields a larger deduction, matching Excel's documented
|
|
33
|
+
* behaviour. `no_switch = TRUE` forces declining-balance for all
|
|
34
|
+
* periods.
|
|
35
|
+
*/
|
|
36
|
+
export declare const fnVDB: NativeFn;
|
|
37
|
+
export declare const fnDB: NativeFn;
|
|
38
|
+
export declare const fnDDB: NativeFn;
|
|
39
|
+
export declare const fnIPMT: NativeFn;
|
|
40
|
+
export declare const fnPPMT: NativeFn;
|
|
41
|
+
/**
|
|
42
|
+
* FVSCHEDULE — future value with a schedule of varying rates.
|
|
43
|
+
*
|
|
44
|
+
* FVSCHEDULE(principal, schedule)
|
|
45
|
+
*
|
|
46
|
+
* Compounds `principal` through each rate in `schedule`:
|
|
47
|
+
* FV = principal · ∏(1 + rᵢ)
|
|
48
|
+
*
|
|
49
|
+
* Excel treats blanks in the schedule as zero (no-op compounding) and
|
|
50
|
+
* propagates any error it encounters. Text values produce #VALUE!.
|
|
51
|
+
*/
|
|
52
|
+
export declare const fnFVSCHEDULE: NativeFn;
|
|
53
|
+
/**
|
|
54
|
+
* PDURATION — number of periods required for an investment to reach a
|
|
55
|
+
* specified value.
|
|
56
|
+
*
|
|
57
|
+
* PDURATION(rate, pv, fv) = (log fv − log pv) / log(1 + rate)
|
|
58
|
+
*
|
|
59
|
+
* Excel requires `rate > 0` and `pv, fv > 0`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const fnPDURATION: NativeFn;
|
|
62
|
+
/**
|
|
63
|
+
* RRI — equivalent interest rate for the growth of an investment.
|
|
64
|
+
*
|
|
65
|
+
* RRI(nper, pv, fv) = (fv / pv)^(1/nper) − 1
|
|
66
|
+
*
|
|
67
|
+
* Excel requires `nper > 0`, `pv > 0`, `fv >= 0`.
|
|
68
|
+
*/
|
|
69
|
+
export declare const fnRRI: NativeFn;
|
|
70
|
+
export declare const fnEFFECT: NativeFn;
|
|
71
|
+
export declare const fnNOMINAL: NativeFn;
|
|
72
|
+
export declare const fnXNPV: NativeFn;
|
|
73
|
+
export declare const fnXIRR: NativeFn;
|
|
74
|
+
export declare const fnMIRR: NativeFn;
|
|
75
|
+
export declare const fnISPMT: NativeFn;
|
|
76
|
+
export declare const fnCUMPRINC: NativeFn;
|
|
77
|
+
export declare const fnCUMIPMT: NativeFn;
|
|
78
|
+
export declare const fnDOLLARDE: NativeFn;
|
|
79
|
+
export declare const fnDOLLARFR: NativeFn;
|
|
80
|
+
export declare const fnDISC: NativeFn;
|
|
81
|
+
export declare const fnPRICEDISC: NativeFn;
|
|
82
|
+
export declare const fnYIELDDISC: NativeFn;
|
|
83
|
+
export declare const fnRECEIVED: NativeFn;
|
|
84
|
+
export declare const fnINTRATE: NativeFn;
|
|
85
|
+
/**
|
|
86
|
+
* PRICE(settlement, maturity, rate, yield, redemption, frequency, [basis])
|
|
87
|
+
*
|
|
88
|
+
* Price per $100 face value of a security that pays periodic interest.
|
|
89
|
+
* Excel formula (standard case, more than one coupon period remaining):
|
|
90
|
+
*
|
|
91
|
+
* P = [redemption / (1 + y/f)^(N - 1 + DSC/E)]
|
|
92
|
+
* + Σ_{k=1..N} [100 * r / f / (1 + y/f)^(k - 1 + DSC/E)]
|
|
93
|
+
* - 100 * r / f * A/E
|
|
94
|
+
*
|
|
95
|
+
* Where:
|
|
96
|
+
* f = frequency
|
|
97
|
+
* N = number of coupons from settlement to maturity
|
|
98
|
+
* DSC = days from settlement to next coupon
|
|
99
|
+
* E = days in coupon period containing settlement
|
|
100
|
+
* A = days from beginning of coupon period to settlement
|
|
101
|
+
*/
|
|
102
|
+
export declare const fnPRICE: NativeFn;
|
|
103
|
+
/**
|
|
104
|
+
* YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])
|
|
105
|
+
*
|
|
106
|
+
* Inverse of PRICE: solve numerically for yield such that PRICE(...y) = pr.
|
|
107
|
+
* Uses bracketed bisection in [0, 1] (100% yield upper bound covers all
|
|
108
|
+
* realistic bond scenarios) followed by a light Newton polish.
|
|
109
|
+
*/
|
|
110
|
+
export declare const fnYIELD: NativeFn;
|
|
111
|
+
/**
|
|
112
|
+
* DURATION(settlement, maturity, coupon, yield, frequency, [basis])
|
|
113
|
+
*
|
|
114
|
+
* Macaulay duration of a bond: the weighted average time to cash flows,
|
|
115
|
+
* weighted by present value. Expressed in years.
|
|
116
|
+
*/
|
|
117
|
+
export declare const fnDURATION: NativeFn;
|
|
118
|
+
/**
|
|
119
|
+
* MDURATION — modified duration = DURATION / (1 + yield/frequency).
|
|
120
|
+
*/
|
|
121
|
+
export declare const fnMDURATION: NativeFn;
|
|
122
|
+
/**
|
|
123
|
+
* ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis], [calc_method])
|
|
124
|
+
*
|
|
125
|
+
* Accrued interest for a security that pays periodic interest.
|
|
126
|
+
* The simplified implementation (calc_method TRUE, the default) treats
|
|
127
|
+
* accrued interest from issue to settlement as par * rate * dcf(issue, settlement, basis).
|
|
128
|
+
*/
|
|
129
|
+
export declare const fnACCRINT: NativeFn;
|
|
130
|
+
/**
|
|
131
|
+
* ACCRINTM(issue, settlement, rate, par, [basis]) — accrued interest
|
|
132
|
+
* for a security that pays interest at maturity.
|
|
133
|
+
* result = par × rate × dayCountFraction(issue, settlement, basis)
|
|
134
|
+
*/
|
|
135
|
+
export declare const fnACCRINTM: NativeFn;
|
|
136
|
+
/**
|
|
137
|
+
* TBILLPRICE(settlement, maturity, discount) — price per $100 face value.
|
|
138
|
+
* price = 100 × (1 - discount × DSM / 360)
|
|
139
|
+
* where DSM is days from settlement to maturity.
|
|
140
|
+
*/
|
|
141
|
+
export declare const fnTBILLPRICE: NativeFn;
|
|
142
|
+
/**
|
|
143
|
+
* TBILLYIELD(settlement, maturity, pr) — bond-equivalent yield.
|
|
144
|
+
* yield = (100 - pr) / pr × (360 / DSM)
|
|
145
|
+
*/
|
|
146
|
+
export declare const fnTBILLYIELD: NativeFn;
|
|
147
|
+
/**
|
|
148
|
+
* TBILLEQ(settlement, maturity, discount) — bond equivalent yield.
|
|
149
|
+
* TBILLEQ = (365 × discount) / (360 - discount × DSM)
|
|
150
|
+
*/
|
|
151
|
+
export declare const fnTBILLEQ: NativeFn;
|
|
152
|
+
/**
|
|
153
|
+
* PRICEMAT(settlement, maturity, issue, rate, yld, [basis]) —
|
|
154
|
+
* price per $100 face value for a security that pays interest at maturity.
|
|
155
|
+
*
|
|
156
|
+
* A = DCF(issue, settlement, basis)
|
|
157
|
+
* DSM = DCF(settlement, maturity, basis)
|
|
158
|
+
* DIM = DCF(issue, maturity, basis)
|
|
159
|
+
* price = (100 + DIM × rate × 100) / (1 + DSM × yld) - A × rate × 100
|
|
160
|
+
*/
|
|
161
|
+
export declare const fnPRICEMAT: NativeFn;
|
|
162
|
+
/**
|
|
163
|
+
* YIELDMAT(settlement, maturity, issue, rate, pr, [basis]) —
|
|
164
|
+
* annual yield for a security that pays interest at maturity.
|
|
165
|
+
*
|
|
166
|
+
* A = DCF(issue, settlement, basis)
|
|
167
|
+
* DSM = DCF(settlement, maturity, basis)
|
|
168
|
+
* DIM = DCF(issue, maturity, basis)
|
|
169
|
+
* yield = ((1 + DIM × rate) / (pr/100 + A × rate) - 1) / DSM
|
|
170
|
+
*/
|
|
171
|
+
export declare const fnYIELDMAT: NativeFn;
|
|
172
|
+
/**
|
|
173
|
+
* COUPNCD(settlement, maturity, frequency, [basis]) — next coupon date
|
|
174
|
+
* after settlement, as an Excel serial.
|
|
175
|
+
*/
|
|
176
|
+
export declare const fnCOUPNCD: NativeFn;
|
|
177
|
+
/**
|
|
178
|
+
* COUPPCD(settlement, maturity, frequency, [basis]) — previous coupon
|
|
179
|
+
* date on or before settlement, as an Excel serial.
|
|
180
|
+
*/
|
|
181
|
+
export declare const fnCOUPPCD: NativeFn;
|
|
182
|
+
/**
|
|
183
|
+
* COUPNUM(settlement, maturity, frequency, [basis]) — number of
|
|
184
|
+
* coupons payable between settlement and maturity, rounded up.
|
|
185
|
+
*/
|
|
186
|
+
export declare const fnCOUPNUM: NativeFn;
|
|
187
|
+
/**
|
|
188
|
+
* COUPDAYSNC(settlement, maturity, frequency, [basis]) — days from
|
|
189
|
+
* settlement to the next coupon date.
|
|
190
|
+
*/
|
|
191
|
+
export declare const fnCOUPDAYSNC: NativeFn;
|
|
192
|
+
/**
|
|
193
|
+
* COUPDAYBS(settlement, maturity, frequency, [basis]) — days from the
|
|
194
|
+
* beginning of the coupon period to settlement.
|
|
195
|
+
*/
|
|
196
|
+
export declare const fnCOUPDAYBS: NativeFn;
|
|
197
|
+
/**
|
|
198
|
+
* COUPDAYS(settlement, maturity, frequency, [basis]) — days in the
|
|
199
|
+
* coupon period that contains settlement.
|
|
200
|
+
*/
|
|
201
|
+
export declare const fnCOUPDAYS: NativeFn;
|
|
202
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lookup / Reference Functions — Native RuntimeValue Implementation
|
|
3
|
+
*/
|
|
4
|
+
import type { RuntimeValue } from "../runtime/values.js";
|
|
5
|
+
export declare function fnROW(args: RuntimeValue[]): RuntimeValue;
|
|
6
|
+
export declare function fnCOLUMN(args: RuntimeValue[]): RuntimeValue;
|
|
7
|
+
export declare function fnROWS(args: RuntimeValue[]): RuntimeValue;
|
|
8
|
+
export declare function fnCOLUMNS(args: RuntimeValue[]): RuntimeValue;
|
|
9
|
+
export declare function fnINDEX(args: RuntimeValue[]): RuntimeValue;
|
|
10
|
+
export declare function fnMATCH(args: RuntimeValue[]): RuntimeValue;
|
|
11
|
+
export declare function fnVLOOKUP(args: RuntimeValue[]): RuntimeValue;
|
|
12
|
+
export declare function fnHLOOKUP(args: RuntimeValue[]): RuntimeValue;
|
|
13
|
+
export declare function fnXLOOKUP(args: RuntimeValue[]): RuntimeValue;
|
|
14
|
+
export declare function fnXMATCH(args: RuntimeValue[]): RuntimeValue;
|
|
15
|
+
export declare function fnADDRESS(args: RuntimeValue[]): RuntimeValue;
|
|
16
|
+
export declare function fnLOOKUP(args: RuntimeValue[]): RuntimeValue;
|
|
17
|
+
export declare function fnTRANSPOSE(args: RuntimeValue[]): RuntimeValue;
|
|
18
|
+
export declare function fnAREAS(args: RuntimeValue[]): RuntimeValue;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Math / Aggregate Functions — Native RuntimeValue implementation.
|
|
3
|
+
*/
|
|
4
|
+
import type { RuntimeValue } from "../runtime/values.js";
|
|
5
|
+
export type NativeFn = (args: RuntimeValue[]) => RuntimeValue;
|
|
6
|
+
export declare const fnSIN: NativeFn;
|
|
7
|
+
export declare const fnCOS: NativeFn;
|
|
8
|
+
export declare const fnTAN: NativeFn;
|
|
9
|
+
export declare const fnASIN: NativeFn;
|
|
10
|
+
export declare const fnACOS: NativeFn;
|
|
11
|
+
export declare const fnATAN: NativeFn;
|
|
12
|
+
export declare const fnATAN2: NativeFn;
|
|
13
|
+
export declare const fnSINH: NativeFn;
|
|
14
|
+
export declare const fnCOSH: NativeFn;
|
|
15
|
+
export declare const fnTANH: NativeFn;
|
|
16
|
+
export declare const fnASINH: NativeFn;
|
|
17
|
+
export declare const fnACOSH: NativeFn;
|
|
18
|
+
export declare const fnATANH: NativeFn;
|
|
19
|
+
/**
|
|
20
|
+
* Secondary trigonometric family (SEC / CSC / COT and hyperbolic /
|
|
21
|
+
* inverse variants). None of these exist on the JavaScript Math object
|
|
22
|
+
* so we derive them from the standard sin / cos / tan primitives, with
|
|
23
|
+
* explicit guards at the discontinuities (π/2 for SEC, multiples of π
|
|
24
|
+
* for CSC / COT, zero for the H variants).
|
|
25
|
+
*/
|
|
26
|
+
export declare const fnSEC: NativeFn;
|
|
27
|
+
export declare const fnCSC: NativeFn;
|
|
28
|
+
export declare const fnCOT: NativeFn;
|
|
29
|
+
export declare const fnSECH: NativeFn;
|
|
30
|
+
export declare const fnCSCH: NativeFn;
|
|
31
|
+
export declare const fnCOTH: NativeFn;
|
|
32
|
+
export declare const fnACOT: NativeFn;
|
|
33
|
+
export declare const fnACOTH: NativeFn;
|
|
34
|
+
export declare const fnSUM: NativeFn;
|
|
35
|
+
export declare const fnAVERAGE: NativeFn;
|
|
36
|
+
export declare const fnMIN: NativeFn;
|
|
37
|
+
export declare const fnMAX: NativeFn;
|
|
38
|
+
export declare const fnCOUNT: NativeFn;
|
|
39
|
+
export declare const fnCOUNTA: NativeFn;
|
|
40
|
+
export declare const fnCOUNTBLANK: NativeFn;
|
|
41
|
+
export declare const fnPRODUCT: NativeFn;
|
|
42
|
+
export declare const fnSUMPRODUCT: NativeFn;
|
|
43
|
+
export declare const fnABS: NativeFn;
|
|
44
|
+
export declare const fnCEILING: NativeFn;
|
|
45
|
+
export declare const fnFLOOR: NativeFn;
|
|
46
|
+
export declare const fnINT: NativeFn;
|
|
47
|
+
export declare const fnMOD: NativeFn;
|
|
48
|
+
export declare const fnPOWER: NativeFn;
|
|
49
|
+
export declare const fnROUND: NativeFn;
|
|
50
|
+
export declare const fnROUNDDOWN: NativeFn;
|
|
51
|
+
export declare const fnROUNDUP: NativeFn;
|
|
52
|
+
export declare const fnSQRT: NativeFn;
|
|
53
|
+
/**
|
|
54
|
+
* SQRTPI(number) — returns the square root of (number × π). Useful in
|
|
55
|
+
* statistical formulas and Gauss integrals.
|
|
56
|
+
*/
|
|
57
|
+
export declare const fnSQRTPI: NativeFn;
|
|
58
|
+
export declare const fnLN: NativeFn;
|
|
59
|
+
export declare const fnLOG: NativeFn;
|
|
60
|
+
export declare const fnLOG10: NativeFn;
|
|
61
|
+
export declare const fnEXP: NativeFn;
|
|
62
|
+
export declare const fnPI: NativeFn;
|
|
63
|
+
export declare const fnRAND: NativeFn;
|
|
64
|
+
export declare const fnRANDBETWEEN: NativeFn;
|
|
65
|
+
export declare const fnSIGN: NativeFn;
|
|
66
|
+
export declare const fnTRUNC: NativeFn;
|
|
67
|
+
export declare const fnSUMSQ: NativeFn;
|
|
68
|
+
export declare const fnGCD: NativeFn;
|
|
69
|
+
export declare const fnLCM: NativeFn;
|
|
70
|
+
export declare const fnEVEN: NativeFn;
|
|
71
|
+
export declare const fnODD: NativeFn;
|
|
72
|
+
export declare const fnMROUND: NativeFn;
|
|
73
|
+
export declare const fnQUOTIENT: NativeFn;
|
|
74
|
+
export declare const fnBASE: NativeFn;
|
|
75
|
+
export declare const fnDECIMAL: NativeFn;
|
|
76
|
+
export declare const fnROMAN: NativeFn;
|
|
77
|
+
export declare const fnARABIC: NativeFn;
|
|
78
|
+
export declare const fnDEGREES: NativeFn;
|
|
79
|
+
export declare const fnRADIANS: NativeFn;
|
|
80
|
+
export declare const fnSUMX2MY2: NativeFn;
|
|
81
|
+
export declare const fnSUMX2PY2: NativeFn;
|
|
82
|
+
export declare const fnSUMXMY2: NativeFn;
|
|
83
|
+
export declare const fnMULTINOMIAL: NativeFn;
|
|
84
|
+
export declare const fnFACT: NativeFn;
|
|
85
|
+
export declare const fnFACTDOUBLE: NativeFn;
|
|
86
|
+
export declare const fnCOMBIN: NativeFn;
|
|
87
|
+
export declare const fnCOMBINA: NativeFn;
|
|
88
|
+
export declare const fnPERMUT: NativeFn;
|
|
89
|
+
/**
|
|
90
|
+
* MMULT(array1, array2) — matrix product. Dimensions must be
|
|
91
|
+
* (m×k) × (k×n) = (m×n); mismatched sizes return #VALUE!.
|
|
92
|
+
*/
|
|
93
|
+
export declare const fnMMULT: NativeFn;
|
|
94
|
+
/**
|
|
95
|
+
* MDETERM(array) — determinant of a square matrix via Gaussian
|
|
96
|
+
* elimination with partial pivoting. Non-square or non-numeric input
|
|
97
|
+
* returns #VALUE!.
|
|
98
|
+
*/
|
|
99
|
+
export declare const fnMDETERM: NativeFn;
|
|
100
|
+
/**
|
|
101
|
+
* MINVERSE(array) — inverse of a square matrix via Gauss-Jordan
|
|
102
|
+
* elimination. Singular matrices return #NUM!; non-square return
|
|
103
|
+
* #VALUE!.
|
|
104
|
+
*/
|
|
105
|
+
export declare const fnMINVERSE: NativeFn;
|
|
106
|
+
/**
|
|
107
|
+
* MUNIT(dimension) — n×n identity matrix.
|
|
108
|
+
*/
|
|
109
|
+
export declare const fnMUNIT: NativeFn;
|
|
110
|
+
/**
|
|
111
|
+
* SERIESSUM(x, n, m, coefficients) — returns the sum of a power series
|
|
112
|
+
* x^n * coef[0] + x^(n+m) * coef[1] + x^(n+2m) * coef[2] + …
|
|
113
|
+
*/
|
|
114
|
+
export declare const fnSERIESSUM: NativeFn;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statistical Functions
|
|
3
|
+
*
|
|
4
|
+
* Native RuntimeValue implementations.
|
|
5
|
+
*/
|
|
6
|
+
import type { RuntimeValue } from "../runtime/values.js";
|
|
7
|
+
type NativeFn = (args: RuntimeValue[]) => RuntimeValue;
|
|
8
|
+
export declare const fnMEDIAN: NativeFn;
|
|
9
|
+
export declare const fnLARGE: NativeFn;
|
|
10
|
+
export declare const fnSMALL: NativeFn;
|
|
11
|
+
export declare const fnRANK: NativeFn;
|
|
12
|
+
export declare const fnSTDEV: NativeFn;
|
|
13
|
+
export declare const fnSTDEVP: NativeFn;
|
|
14
|
+
export declare const fnVAR: NativeFn;
|
|
15
|
+
export declare const fnVARP: NativeFn;
|
|
16
|
+
export declare const fnNORMSDIST: NativeFn;
|
|
17
|
+
export declare const fnNORMDIST: NativeFn;
|
|
18
|
+
export declare const fnNORMSINV: NativeFn;
|
|
19
|
+
export declare const fnNORMINV: NativeFn;
|
|
20
|
+
export declare const fnPERCENTILE: NativeFn;
|
|
21
|
+
export declare const fnPERCENTILEEXC: NativeFn;
|
|
22
|
+
export declare const fnQUARTILE: NativeFn;
|
|
23
|
+
export declare const fnQUARTILEEXC: NativeFn;
|
|
24
|
+
export declare const fnMODE: NativeFn;
|
|
25
|
+
/**
|
|
26
|
+
* MODE.MULT — returns a vertical array of every mode (dynamic array).
|
|
27
|
+
* When the dataset is multimodal Excel spills all of them; for a single
|
|
28
|
+
* mode it behaves like MODE.SNGL.
|
|
29
|
+
*/
|
|
30
|
+
export declare const fnMODE_MULT: NativeFn;
|
|
31
|
+
export declare const fnCORREL: NativeFn;
|
|
32
|
+
export declare const fnSLOPE: NativeFn;
|
|
33
|
+
export declare const fnINTERCEPT: NativeFn;
|
|
34
|
+
export declare const fnRSQ: NativeFn;
|
|
35
|
+
/**
|
|
36
|
+
* STEYX(known_y, known_x) — standard error of the predicted y-value for
|
|
37
|
+
* each x in a regression. Matches Excel's definition:
|
|
38
|
+
* SE = sqrt((1/(n-2)) × (S_yy − S_xy² / S_xx))
|
|
39
|
+
* where S_xx, S_yy, S_xy are centred sums of squares / cross-product.
|
|
40
|
+
*/
|
|
41
|
+
export declare const fnSTEYX: NativeFn;
|
|
42
|
+
export declare const fnFORECAST: NativeFn;
|
|
43
|
+
export { fnFACT, fnFACTDOUBLE, fnCOMBIN, fnCOMBINA, fnPERMUT } from "./math.js";
|
|
44
|
+
export declare const fnGEOMEAN: NativeFn;
|
|
45
|
+
export declare const fnHARMEAN: NativeFn;
|
|
46
|
+
export declare const fnTRIMMEAN: NativeFn;
|
|
47
|
+
export declare const fnDEVSQ: NativeFn;
|
|
48
|
+
export declare const fnAVEDEV: NativeFn;
|
|
49
|
+
export declare const fnCONFIDENCENORM: NativeFn;
|
|
50
|
+
/**
|
|
51
|
+
* CONFIDENCE.T — confidence interval half-width for the mean using the
|
|
52
|
+
* Student's t distribution (small sample / unknown population variance).
|
|
53
|
+
*/
|
|
54
|
+
export declare const fnCONFIDENCE_T: NativeFn;
|
|
55
|
+
/** COVARIANCE.P — population covariance. */
|
|
56
|
+
export declare const fnCOVARIANCE_P: NativeFn;
|
|
57
|
+
/** COVARIANCE.S — sample covariance (divide by n-1). */
|
|
58
|
+
export declare const fnCOVARIANCE_S: NativeFn;
|
|
59
|
+
/**
|
|
60
|
+
* RANK.AVG — average-tie rank. Identical to RANK.EQ except that tied
|
|
61
|
+
* positions return the average of the ranks they would otherwise span.
|
|
62
|
+
*/
|
|
63
|
+
export declare const fnRANK_AVG: NativeFn;
|
|
64
|
+
export declare const fnFISHER: NativeFn;
|
|
65
|
+
export declare const fnFISHERINV: NativeFn;
|
|
66
|
+
export declare const fnAVERAGEA: NativeFn;
|
|
67
|
+
export declare const fnMAXA: NativeFn;
|
|
68
|
+
export declare const fnMINA: NativeFn;
|
|
69
|
+
export declare const fnPOISSON_DIST: NativeFn;
|
|
70
|
+
export declare const fnBINOM_DIST: NativeFn;
|
|
71
|
+
/**
|
|
72
|
+
* BINOM.DIST.RANGE(trials, probability, number_s, [number_s2]) —
|
|
73
|
+
* probability of a binomial trial outcome between `number_s` and
|
|
74
|
+
* `number_s2` (inclusive). When `number_s2` is omitted, returns the
|
|
75
|
+
* probability of exactly `number_s` successes.
|
|
76
|
+
*/
|
|
77
|
+
export declare const fnBINOM_DIST_RANGE: NativeFn;
|
|
78
|
+
export declare const fnBINOM_INV: NativeFn;
|
|
79
|
+
export declare const fnHYPGEOM_DIST: NativeFn;
|
|
80
|
+
export declare const fnNEGBINOM_DIST: NativeFn;
|
|
81
|
+
export declare const fnCHISQ_DIST: NativeFn;
|
|
82
|
+
export declare const fnCHISQ_INV: NativeFn;
|
|
83
|
+
export declare const fnCHISQ_DIST_RT: NativeFn;
|
|
84
|
+
/**
|
|
85
|
+
* CHISQ.INV.RT(probability, df) — right-tailed inverse of chi-square.
|
|
86
|
+
* Equivalent to CHISQ.INV(1 - probability, df). Probabilities of 0 or 1
|
|
87
|
+
* return +∞ or 0 respectively; values outside (0, 1] are #NUM!.
|
|
88
|
+
*/
|
|
89
|
+
export declare const fnCHISQ_INV_RT: NativeFn;
|
|
90
|
+
export declare const fnF_DIST: NativeFn;
|
|
91
|
+
export declare const fnF_INV: NativeFn;
|
|
92
|
+
export declare const fnT_DIST: NativeFn;
|
|
93
|
+
export declare const fnT_INV: NativeFn;
|
|
94
|
+
export declare const fnT_DIST_2T: NativeFn;
|
|
95
|
+
export declare const fnT_DIST_RT: NativeFn;
|
|
96
|
+
export declare const fnT_INV_2T: NativeFn;
|
|
97
|
+
export declare const fnBETA_DIST: NativeFn;
|
|
98
|
+
export declare const fnBETA_INV: NativeFn;
|
|
99
|
+
export declare const fnGAMMA: NativeFn;
|
|
100
|
+
export declare const fnGAMMALN: NativeFn;
|
|
101
|
+
export declare const fnGAMMA_DIST: NativeFn;
|
|
102
|
+
export declare const fnGAMMA_INV: NativeFn;
|
|
103
|
+
export declare const fnEXPON_DIST: NativeFn;
|
|
104
|
+
export declare const fnWEIBULL_DIST: NativeFn;
|
|
105
|
+
export declare const fnLOGNORM_DIST: NativeFn;
|
|
106
|
+
export declare const fnLOGNORM_INV: NativeFn;
|
|
107
|
+
export declare const fnPHI: NativeFn;
|
|
108
|
+
export declare const fnGAUSS: NativeFn;
|
|
109
|
+
export declare const fnERF: NativeFn;
|
|
110
|
+
export declare const fnERFC: NativeFn;
|
|
111
|
+
export declare const fnSTANDARDIZE: NativeFn;
|
|
112
|
+
export declare const fnFREQUENCY: NativeFn;
|
|
113
|
+
export declare const fnGROWTH: NativeFn;
|
|
114
|
+
export declare const fnTREND: NativeFn;
|
|
115
|
+
export declare const fnLINEST: NativeFn;
|
|
116
|
+
export declare const fnLOGEST: NativeFn;
|
|
117
|
+
/**
|
|
118
|
+
* F.DIST.RT(x, d1, d2) — right-tail probability of the F-distribution.
|
|
119
|
+
*
|
|
120
|
+
* Equivalent to `1 - F.DIST(x, d1, d2, TRUE)`. Using the symmetry of the
|
|
121
|
+
* regularized incomplete beta function, this can be expressed as
|
|
122
|
+
* `I(d2/(d2 + d1*x), d2/2, d1/2)`, which avoids subtracting from 1 and
|
|
123
|
+
* is numerically stable in the upper tail.
|
|
124
|
+
*/
|
|
125
|
+
export declare const fnF_DIST_RT: NativeFn;
|
|
126
|
+
/**
|
|
127
|
+
* F.INV.RT(p, d1, d2) — inverse right-tail of the F-distribution.
|
|
128
|
+
* Returns x such that P(F > x) = p. Implemented via binary search on the
|
|
129
|
+
* right-tail CDF (monotonically decreasing from 1 at x=0 to 0 at x=∞).
|
|
130
|
+
*/
|
|
131
|
+
export declare const fnF_INV_RT: NativeFn;
|
|
132
|
+
/**
|
|
133
|
+
* SKEW — sample skewness.
|
|
134
|
+
* Formula: n / ((n-1)(n-2)) * Σ((xi-mean)/s)^3, where s is the sample stdev.
|
|
135
|
+
*/
|
|
136
|
+
export declare const fnSKEW: NativeFn;
|
|
137
|
+
/**
|
|
138
|
+
* SKEW.P — population skewness.
|
|
139
|
+
* Formula: (1/n) * Σ((xi-mean)/σ)^3, where σ is the population stdev.
|
|
140
|
+
*/
|
|
141
|
+
export declare const fnSKEW_P: NativeFn;
|
|
142
|
+
/**
|
|
143
|
+
* KURT — sample excess kurtosis.
|
|
144
|
+
* Formula: n(n+1) / ((n-1)(n-2)(n-3)) * Σ((xi-mean)/s)^4 - 3(n-1)^2 / ((n-2)(n-3)).
|
|
145
|
+
*/
|
|
146
|
+
export declare const fnKURT: NativeFn;
|
|
147
|
+
export declare const fnPERCENTRANK: NativeFn;
|
|
148
|
+
export declare const fnPERCENTRANK_INC: NativeFn;
|
|
149
|
+
export declare const fnPERCENTRANK_EXC: NativeFn;
|
|
150
|
+
/**
|
|
151
|
+
* PROB(x_range, prob_range, lower_limit, [upper_limit]) — probability that
|
|
152
|
+
* values in x_range are between lower_limit and upper_limit inclusive.
|
|
153
|
+
*
|
|
154
|
+
* Excel rules:
|
|
155
|
+
* - x_range and prob_range must have the same dimensions
|
|
156
|
+
* - prob_range entries must sum to 1 (±ε); otherwise #NUM!
|
|
157
|
+
* - Any prob entry ≤ 0 or > 1 → #NUM!
|
|
158
|
+
* - upper_limit omitted → probability that x = lower_limit
|
|
159
|
+
* - Result is the sum of prob_range entries for which
|
|
160
|
+
* lower_limit ≤ x_range value ≤ upper_limit
|
|
161
|
+
*/
|
|
162
|
+
export declare const fnPROB: NativeFn;
|
|
163
|
+
/**
|
|
164
|
+
* Z.TEST(array, x, [sigma]) — one-tailed probability value for z-test.
|
|
165
|
+
* mean = AVERAGE(array), n = COUNT(array)
|
|
166
|
+
* sigma = provided OR sample standard deviation of array
|
|
167
|
+
* z = (mean - x) / (sigma / √n)
|
|
168
|
+
* Z.TEST = 1 - NORM.S.DIST(z, TRUE)
|
|
169
|
+
*/
|
|
170
|
+
export declare const fnZ_TEST: NativeFn;
|
|
171
|
+
/**
|
|
172
|
+
* F.TEST(array1, array2) — two-tailed F-test probability comparing
|
|
173
|
+
* the variances of two samples.
|
|
174
|
+
*
|
|
175
|
+
* F = var(larger) / var(smaller) (always >= 1)
|
|
176
|
+
* P = 2 × P(F_dist(df1, df2) > F)
|
|
177
|
+
*/
|
|
178
|
+
export declare const fnF_TEST: NativeFn;
|
|
179
|
+
/**
|
|
180
|
+
* T.TEST(array1, array2, tails, type) — tails in {1, 2}, type in {1, 2, 3}.
|
|
181
|
+
* type 1: paired
|
|
182
|
+
* type 2: two-sample, equal variance
|
|
183
|
+
* type 3: two-sample, unequal variance (Welch's)
|
|
184
|
+
*/
|
|
185
|
+
export declare const fnT_TEST: NativeFn;
|
|
186
|
+
/**
|
|
187
|
+
* CHISQ.TEST(actual_range, expected_range) — chi-square independence test.
|
|
188
|
+
*
|
|
189
|
+
* χ² = Σ (actual_i - expected_i)² / expected_i
|
|
190
|
+
* df = (rows-1)(cols-1) for a contingency table, or n-1 for 1-D
|
|
191
|
+
* p = 1 - CHISQ.DIST(χ², df, TRUE)
|
|
192
|
+
*/
|
|
193
|
+
export declare const fnCHISQ_TEST: NativeFn;
|