@rowsncolumns/toolkit 24.4.1
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/LICENSE.md +100 -0
- package/Readme.md +27 -0
- package/dist/cjs/autofilter-condition.d.ts +43 -0
- package/dist/cjs/autofilter-condition.d.ts.map +1 -0
- package/dist/cjs/autofilter-condition.js +155 -0
- package/dist/cjs/csv-export.d.ts +49 -0
- package/dist/cjs/csv-export.d.ts.map +1 -0
- package/dist/cjs/csv-export.js +142 -0
- package/dist/cjs/csv-import-worker.d.ts +16 -0
- package/dist/cjs/csv-import-worker.d.ts.map +1 -0
- package/dist/cjs/csv-import-worker.js +60 -0
- package/dist/cjs/csv-import.d.ts +38 -0
- package/dist/cjs/csv-import.d.ts.map +1 -0
- package/dist/cjs/csv-import.js +166 -0
- package/dist/cjs/csv-parser/helpers.d.ts +14 -0
- package/dist/cjs/csv-parser/helpers.d.ts.map +1 -0
- package/dist/cjs/csv-parser/helpers.js +145 -0
- package/dist/cjs/csv-parser/types.d.ts +66 -0
- package/dist/cjs/csv-parser/types.d.ts.map +1 -0
- package/dist/cjs/csv-parser/types.js +14 -0
- package/dist/cjs/csv-parser/worker.d.ts +2 -0
- package/dist/cjs/csv-parser/worker.d.ts.map +1 -0
- package/dist/cjs/csv-parser/worker.js +200 -0
- package/dist/cjs/excel-export.d.ts +11 -0
- package/dist/cjs/excel-export.d.ts.map +1 -0
- package/dist/cjs/excel-export.js +22 -0
- package/dist/cjs/excel-import-session.d.ts +51 -0
- package/dist/cjs/excel-import-session.d.ts.map +1 -0
- package/dist/cjs/excel-import-session.js +307 -0
- package/dist/cjs/excel-import-worker.d.ts +7 -0
- package/dist/cjs/excel-import-worker.d.ts.map +1 -0
- package/dist/cjs/excel-import-worker.js +119 -0
- package/dist/cjs/excel-parser/builtin-numfmts.d.ts +24 -0
- package/dist/cjs/excel-parser/builtin-numfmts.d.ts.map +1 -0
- package/dist/cjs/excel-parser/builtin-numfmts.js +63 -0
- package/dist/cjs/excel-parser/cfb-decryptor.d.ts +53 -0
- package/dist/cjs/excel-parser/cfb-decryptor.d.ts.map +1 -0
- package/dist/cjs/excel-parser/cfb-decryptor.js +553 -0
- package/dist/cjs/excel-parser/cfb-encryptor.d.ts +23 -0
- package/dist/cjs/excel-parser/cfb-encryptor.d.ts.map +1 -0
- package/dist/cjs/excel-parser/cfb-encryptor.js +200 -0
- package/dist/cjs/excel-parser/dv-cell-stamp.d.ts +29 -0
- package/dist/cjs/excel-parser/dv-cell-stamp.d.ts.map +1 -0
- package/dist/cjs/excel-parser/dv-cell-stamp.js +239 -0
- package/dist/cjs/excel-parser/helpers.d.ts +28 -0
- package/dist/cjs/excel-parser/helpers.d.ts.map +1 -0
- package/dist/cjs/excel-parser/helpers.js +188 -0
- package/dist/cjs/excel-parser/interface.d.ts +179 -0
- package/dist/cjs/excel-parser/interface.d.ts.map +1 -0
- package/dist/cjs/excel-parser/interface.js +1 -0
- package/dist/cjs/excel-parser/plugins/base/index.d.ts +31 -0
- package/dist/cjs/excel-parser/plugins/base/index.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/base/index.js +101 -0
- package/dist/cjs/excel-parser/plugins/ods/conditional-formatting.d.ts +16 -0
- package/dist/cjs/excel-parser/plugins/ods/conditional-formatting.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/conditional-formatting.js +488 -0
- package/dist/cjs/excel-parser/plugins/ods/data-validations.d.ts +15 -0
- package/dist/cjs/excel-parser/plugins/ods/data-validations.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/data-validations.js +353 -0
- package/dist/cjs/excel-parser/plugins/ods/formula.d.ts +8 -0
- package/dist/cjs/excel-parser/plugins/ods/formula.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/formula.js +82 -0
- package/dist/cjs/excel-parser/plugins/ods/index.d.ts +122 -0
- package/dist/cjs/excel-parser/plugins/ods/index.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/index.js +3642 -0
- package/dist/cjs/excel-parser/plugins/ods/sparklines.d.ts +25 -0
- package/dist/cjs/excel-parser/plugins/ods/sparklines.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/sparklines.js +221 -0
- package/dist/cjs/excel-parser/plugins/ods/styles.d.ts +60 -0
- package/dist/cjs/excel-parser/plugins/ods/styles.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/styles.js +808 -0
- package/dist/cjs/excel-parser/plugins/ods/types.d.ts +7 -0
- package/dist/cjs/excel-parser/plugins/ods/types.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/ods/types.js +1 -0
- package/dist/cjs/excel-parser/plugins/xls/index.d.ts +5 -0
- package/dist/cjs/excel-parser/plugins/xls/index.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xls/index.js +19 -0
- package/dist/cjs/excel-parser/plugins/xlsb/biff-record-reader.d.ts +13 -0
- package/dist/cjs/excel-parser/plugins/xlsb/biff-record-reader.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsb/biff-record-reader.js +49 -0
- package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts +117 -0
- package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsb/index.js +2972 -0
- package/dist/cjs/excel-parser/plugins/xlsb/rgce-parser.d.ts +18 -0
- package/dist/cjs/excel-parser/plugins/xlsb/rgce-parser.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsb/rgce-parser.js +527 -0
- package/dist/cjs/excel-parser/plugins/xlsm/index.d.ts +5 -0
- package/dist/cjs/excel-parser/plugins/xlsm/index.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsm/index.js +10 -0
- package/dist/cjs/excel-parser/plugins/xlsx/charts.d.ts +60 -0
- package/dist/cjs/excel-parser/plugins/xlsx/charts.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/charts.js +2178 -0
- package/dist/cjs/excel-parser/plugins/xlsx/conditional-formatting.d.ts +18 -0
- package/dist/cjs/excel-parser/plugins/xlsx/conditional-formatting.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/conditional-formatting.js +620 -0
- package/dist/cjs/excel-parser/plugins/xlsx/data-validations.d.ts +4 -0
- package/dist/cjs/excel-parser/plugins/xlsx/data-validations.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/data-validations.js +515 -0
- package/dist/cjs/excel-parser/plugins/xlsx/drawing.d.ts +39 -0
- package/dist/cjs/excel-parser/plugins/xlsx/drawing.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/drawing.js +941 -0
- package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts +320 -0
- package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/index.js +6056 -0
- package/dist/cjs/excel-parser/plugins/xlsx/numfmt.d.ts +2 -0
- package/dist/cjs/excel-parser/plugins/xlsx/numfmt.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/numfmt.js +3 -0
- package/dist/cjs/excel-parser/plugins/xlsx/pivots.d.ts +40 -0
- package/dist/cjs/excel-parser/plugins/xlsx/pivots.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/pivots.js +342 -0
- package/dist/cjs/excel-parser/plugins/xlsx/relationships.d.ts +8 -0
- package/dist/cjs/excel-parser/plugins/xlsx/relationships.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/relationships.js +26 -0
- package/dist/cjs/excel-parser/plugins/xlsx/sheet-views.d.ts +26 -0
- package/dist/cjs/excel-parser/plugins/xlsx/sheet-views.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/sheet-views.js +59 -0
- package/dist/cjs/excel-parser/plugins/xlsx/styles.d.ts +44 -0
- package/dist/cjs/excel-parser/plugins/xlsx/styles.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/styles.js +1377 -0
- package/dist/cjs/excel-parser/plugins/xlsx/theme.d.ts +50 -0
- package/dist/cjs/excel-parser/plugins/xlsx/theme.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/theme.js +150 -0
- package/dist/cjs/excel-parser/plugins/xlsx/threaded-comments.d.ts +47 -0
- package/dist/cjs/excel-parser/plugins/xlsx/threaded-comments.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/threaded-comments.js +141 -0
- package/dist/cjs/excel-parser/plugins/xlsx/value-type-detection.d.ts +44 -0
- package/dist/cjs/excel-parser/plugins/xlsx/value-type-detection.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsx/value-type-detection.js +407 -0
- package/dist/cjs/excel-parser/registry.d.ts +5 -0
- package/dist/cjs/excel-parser/registry.d.ts.map +1 -0
- package/dist/cjs/excel-parser/registry.js +21 -0
- package/dist/cjs/excel-parser/style-registry.d.ts +51 -0
- package/dist/cjs/excel-parser/style-registry.d.ts.map +1 -0
- package/dist/cjs/excel-parser/style-registry.js +175 -0
- package/dist/cjs/excel-parser/theme-default.d.ts +3 -0
- package/dist/cjs/excel-parser/theme-default.d.ts.map +1 -0
- package/dist/cjs/excel-parser/theme-default.js +19 -0
- package/dist/cjs/excel-parser/types.d.ts +365 -0
- package/dist/cjs/excel-parser/types.d.ts.map +1 -0
- package/dist/cjs/excel-parser/types.js +59 -0
- package/dist/cjs/excel-parser/utils.d.ts +6 -0
- package/dist/cjs/excel-parser/utils.d.ts.map +1 -0
- package/dist/cjs/excel-parser/utils.js +30 -0
- package/dist/cjs/excel-parser/workbook.d.ts +51 -0
- package/dist/cjs/excel-parser/workbook.d.ts.map +1 -0
- package/dist/cjs/excel-parser/workbook.js +317 -0
- package/dist/cjs/excel-parser/worker.d.ts +2 -0
- package/dist/cjs/excel-parser/worker.d.ts.map +1 -0
- package/dist/cjs/excel-parser/worker.js +1149 -0
- package/dist/cjs/excel-parser/zip-parser-streaming.d.ts +13 -0
- package/dist/cjs/excel-parser/zip-parser-streaming.d.ts.map +1 -0
- package/dist/cjs/excel-parser/zip-parser-streaming.js +200 -0
- package/dist/cjs/excel-parser/zip-parser.d.ts +11 -0
- package/dist/cjs/excel-parser/zip-parser.d.ts.map +1 -0
- package/dist/cjs/excel-parser/zip-parser.js +49 -0
- package/dist/cjs/exporter/invalid-data-validation.d.ts +19 -0
- package/dist/cjs/exporter/invalid-data-validation.d.ts.map +1 -0
- package/dist/cjs/exporter/invalid-data-validation.js +39 -0
- package/dist/cjs/exporter/ods/ods-export.d.ts +26 -0
- package/dist/cjs/exporter/ods/ods-export.d.ts.map +1 -0
- package/dist/cjs/exporter/ods/ods-export.js +3714 -0
- package/dist/cjs/exporter/ods/sparkline-builder.d.ts +33 -0
- package/dist/cjs/exporter/ods/sparkline-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/ods/sparkline-builder.js +221 -0
- package/dist/cjs/exporter/xlsx/chart-builder.d.ts +3 -0
- package/dist/cjs/exporter/xlsx/chart-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/chart-builder.js +1901 -0
- package/dist/cjs/exporter/xlsx/chart-templates.d.ts +1781 -0
- package/dist/cjs/exporter/xlsx/chart-templates.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/chart-templates.js +1798 -0
- package/dist/cjs/exporter/xlsx/future-functions.d.ts +10 -0
- package/dist/cjs/exporter/xlsx/future-functions.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/future-functions.js +264 -0
- package/dist/cjs/exporter/xlsx/pivot-builder.d.ts +58 -0
- package/dist/cjs/exporter/xlsx/pivot-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/pivot-builder.js +277 -0
- package/dist/cjs/exporter/xlsx/power-query-builder.d.ts +26 -0
- package/dist/cjs/exporter/xlsx/power-query-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/power-query-builder.js +306 -0
- package/dist/cjs/exporter/xlsx/slicer-builder.d.ts +11 -0
- package/dist/cjs/exporter/xlsx/slicer-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/slicer-builder.js +87 -0
- package/dist/cjs/exporter/xlsx/sparkline-builder.d.ts +61 -0
- package/dist/cjs/exporter/xlsx/sparkline-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/sparkline-builder.js +489 -0
- package/dist/cjs/exporter/xlsx/style-builder.d.ts +93 -0
- package/dist/cjs/exporter/xlsx/style-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/style-builder.js +813 -0
- package/dist/cjs/exporter/xlsx/threaded-comments-builder.d.ts +58 -0
- package/dist/cjs/exporter/xlsx/threaded-comments-builder.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/threaded-comments-builder.js +189 -0
- package/dist/cjs/exporter/xlsx/xlsx-export.d.ts +121 -0
- package/dist/cjs/exporter/xlsx/xlsx-export.d.ts.map +1 -0
- package/dist/cjs/exporter/xlsx/xlsx-export.js +4596 -0
- package/dist/cjs/helpers/theme-xml-generator.d.ts +8 -0
- package/dist/cjs/helpers/theme-xml-generator.d.ts.map +1 -0
- package/dist/cjs/helpers/theme-xml-generator.js +33 -0
- package/dist/cjs/helpers.d.ts +34 -0
- package/dist/cjs/helpers.d.ts.map +1 -0
- package/dist/cjs/helpers.js +189 -0
- package/dist/cjs/index.d.ts +16 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/indexed-colors.d.ts +2 -0
- package/dist/cjs/indexed-colors.d.ts.map +1 -0
- package/dist/cjs/indexed-colors.js +75 -0
- package/dist/cjs/ods-export.d.ts +24 -0
- package/dist/cjs/ods-export.d.ts.map +1 -0
- package/dist/cjs/ods-export.js +23 -0
- package/dist/cjs/parse.d.ts +24 -0
- package/dist/cjs/parse.d.ts.map +1 -0
- package/dist/cjs/parse.js +68 -0
- package/dist/cjs/power-query.d.ts +41 -0
- package/dist/cjs/power-query.d.ts.map +1 -0
- package/dist/cjs/power-query.js +22 -0
- package/dist/cjs/server.d.ts +9 -0
- package/dist/cjs/server.d.ts.map +1 -0
- package/dist/cjs/server.js +8 -0
- package/dist/cjs/theme1.d.ts +3 -0
- package/dist/cjs/theme1.d.ts.map +1 -0
- package/dist/cjs/theme1.js +2 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/cjs/types.d.ts +14 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +14 -0
- package/dist/cjs/vitest.config.d.ts +3 -0
- package/dist/cjs/vitest.config.d.ts.map +1 -0
- package/dist/cjs/vitest.config.js +16 -0
- package/dist/esm/autofilter-condition.d.ts +43 -0
- package/dist/esm/autofilter-condition.d.ts.map +1 -0
- package/dist/esm/autofilter-condition.js +145 -0
- package/dist/esm/csv-export.d.ts +49 -0
- package/dist/esm/csv-export.d.ts.map +1 -0
- package/dist/esm/csv-export.js +126 -0
- package/dist/esm/csv-import-worker.d.ts +16 -0
- package/dist/esm/csv-import-worker.d.ts.map +1 -0
- package/dist/esm/csv-import-worker.js +60 -0
- package/dist/esm/csv-import.d.ts +38 -0
- package/dist/esm/csv-import.d.ts.map +1 -0
- package/dist/esm/csv-import.js +132 -0
- package/dist/esm/csv-parser/helpers.d.ts +14 -0
- package/dist/esm/csv-parser/helpers.d.ts.map +1 -0
- package/dist/esm/csv-parser/helpers.js +0 -0
- package/dist/esm/csv-parser/types.d.ts +66 -0
- package/dist/esm/csv-parser/types.d.ts.map +1 -0
- package/dist/esm/csv-parser/types.js +14 -0
- package/dist/esm/csv-parser/worker.d.ts +2 -0
- package/dist/esm/csv-parser/worker.d.ts.map +1 -0
- package/dist/esm/csv-parser/worker.js +154 -0
- package/dist/esm/excel-export.d.ts +11 -0
- package/dist/esm/excel-export.d.ts.map +1 -0
- package/dist/esm/excel-export.js +13 -0
- package/dist/esm/excel-import-session.d.ts +51 -0
- package/dist/esm/excel-import-session.d.ts.map +1 -0
- package/dist/esm/excel-import-session.js +255 -0
- package/dist/esm/excel-import-worker.d.ts +7 -0
- package/dist/esm/excel-import-worker.d.ts.map +1 -0
- package/dist/esm/excel-import-worker.js +116 -0
- package/dist/esm/excel-parser/builtin-numfmts.d.ts +24 -0
- package/dist/esm/excel-parser/builtin-numfmts.d.ts.map +1 -0
- package/dist/esm/excel-parser/builtin-numfmts.js +59 -0
- package/dist/esm/excel-parser/cfb-decryptor.d.ts +53 -0
- package/dist/esm/excel-parser/cfb-decryptor.d.ts.map +1 -0
- package/dist/esm/excel-parser/cfb-decryptor.js +493 -0
- package/dist/esm/excel-parser/cfb-encryptor.d.ts +23 -0
- package/dist/esm/excel-parser/cfb-encryptor.d.ts.map +1 -0
- package/dist/esm/excel-parser/cfb-encryptor.js +181 -0
- package/dist/esm/excel-parser/dv-cell-stamp.d.ts +29 -0
- package/dist/esm/excel-parser/dv-cell-stamp.d.ts.map +1 -0
- package/dist/esm/excel-parser/dv-cell-stamp.js +155 -0
- package/dist/esm/excel-parser/helpers.d.ts +28 -0
- package/dist/esm/excel-parser/helpers.d.ts.map +1 -0
- package/dist/esm/excel-parser/helpers.js +160 -0
- package/dist/esm/excel-parser/interface.d.ts +179 -0
- package/dist/esm/excel-parser/interface.d.ts.map +1 -0
- package/dist/esm/excel-parser/interface.js +1 -0
- package/dist/esm/excel-parser/plugins/base/index.d.ts +31 -0
- package/dist/esm/excel-parser/plugins/base/index.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/base/index.js +64 -0
- package/dist/esm/excel-parser/plugins/ods/conditional-formatting.d.ts +16 -0
- package/dist/esm/excel-parser/plugins/ods/conditional-formatting.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/conditional-formatting.js +405 -0
- package/dist/esm/excel-parser/plugins/ods/data-validations.d.ts +15 -0
- package/dist/esm/excel-parser/plugins/ods/data-validations.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/data-validations.js +331 -0
- package/dist/esm/excel-parser/plugins/ods/formula.d.ts +8 -0
- package/dist/esm/excel-parser/plugins/ods/formula.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/formula.js +82 -0
- package/dist/esm/excel-parser/plugins/ods/index.d.ts +122 -0
- package/dist/esm/excel-parser/plugins/ods/index.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/index.js +2896 -0
- package/dist/esm/excel-parser/plugins/ods/sparklines.d.ts +25 -0
- package/dist/esm/excel-parser/plugins/ods/sparklines.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/sparklines.js +188 -0
- package/dist/esm/excel-parser/plugins/ods/styles.d.ts +60 -0
- package/dist/esm/excel-parser/plugins/ods/styles.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/styles.js +732 -0
- package/dist/esm/excel-parser/plugins/ods/types.d.ts +7 -0
- package/dist/esm/excel-parser/plugins/ods/types.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/ods/types.js +1 -0
- package/dist/esm/excel-parser/plugins/xls/index.d.ts +5 -0
- package/dist/esm/excel-parser/plugins/xls/index.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xls/index.js +7 -0
- package/dist/esm/excel-parser/plugins/xlsb/biff-record-reader.d.ts +13 -0
- package/dist/esm/excel-parser/plugins/xlsb/biff-record-reader.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsb/biff-record-reader.js +48 -0
- package/dist/esm/excel-parser/plugins/xlsb/index.d.ts +117 -0
- package/dist/esm/excel-parser/plugins/xlsb/index.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsb/index.js +2339 -0
- package/dist/esm/excel-parser/plugins/xlsb/rgce-parser.d.ts +18 -0
- package/dist/esm/excel-parser/plugins/xlsb/rgce-parser.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsb/rgce-parser.js +522 -0
- package/dist/esm/excel-parser/plugins/xlsm/index.d.ts +5 -0
- package/dist/esm/excel-parser/plugins/xlsm/index.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsm/index.js +6 -0
- package/dist/esm/excel-parser/plugins/xlsx/charts.d.ts +60 -0
- package/dist/esm/excel-parser/plugins/xlsx/charts.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/charts.js +2036 -0
- package/dist/esm/excel-parser/plugins/xlsx/conditional-formatting.d.ts +18 -0
- package/dist/esm/excel-parser/plugins/xlsx/conditional-formatting.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/conditional-formatting.js +621 -0
- package/dist/esm/excel-parser/plugins/xlsx/data-validations.d.ts +4 -0
- package/dist/esm/excel-parser/plugins/xlsx/data-validations.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/data-validations.js +493 -0
- package/dist/esm/excel-parser/plugins/xlsx/drawing.d.ts +39 -0
- package/dist/esm/excel-parser/plugins/xlsx/drawing.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/drawing.js +905 -0
- package/dist/esm/excel-parser/plugins/xlsx/index.d.ts +320 -0
- package/dist/esm/excel-parser/plugins/xlsx/index.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/index.js +4654 -0
- package/dist/esm/excel-parser/plugins/xlsx/numfmt.d.ts +2 -0
- package/dist/esm/excel-parser/plugins/xlsx/numfmt.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/numfmt.js +3 -0
- package/dist/esm/excel-parser/plugins/xlsx/pivots.d.ts +40 -0
- package/dist/esm/excel-parser/plugins/xlsx/pivots.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/pivots.js +254 -0
- package/dist/esm/excel-parser/plugins/xlsx/relationships.d.ts +8 -0
- package/dist/esm/excel-parser/plugins/xlsx/relationships.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/relationships.js +13 -0
- package/dist/esm/excel-parser/plugins/xlsx/sheet-views.d.ts +26 -0
- package/dist/esm/excel-parser/plugins/xlsx/sheet-views.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/sheet-views.js +64 -0
- package/dist/esm/excel-parser/plugins/xlsx/styles.d.ts +44 -0
- package/dist/esm/excel-parser/plugins/xlsx/styles.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/styles.js +1365 -0
- package/dist/esm/excel-parser/plugins/xlsx/theme.d.ts +50 -0
- package/dist/esm/excel-parser/plugins/xlsx/theme.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/theme.js +127 -0
- package/dist/esm/excel-parser/plugins/xlsx/threaded-comments.d.ts +47 -0
- package/dist/esm/excel-parser/plugins/xlsx/threaded-comments.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/threaded-comments.js +103 -0
- package/dist/esm/excel-parser/plugins/xlsx/value-type-detection.d.ts +44 -0
- package/dist/esm/excel-parser/plugins/xlsx/value-type-detection.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsx/value-type-detection.js +399 -0
- package/dist/esm/excel-parser/registry.d.ts +5 -0
- package/dist/esm/excel-parser/registry.d.ts.map +1 -0
- package/dist/esm/excel-parser/registry.js +20 -0
- package/dist/esm/excel-parser/style-registry.d.ts +51 -0
- package/dist/esm/excel-parser/style-registry.d.ts.map +1 -0
- package/dist/esm/excel-parser/style-registry.js +163 -0
- package/dist/esm/excel-parser/theme-default.d.ts +3 -0
- package/dist/esm/excel-parser/theme-default.d.ts.map +1 -0
- package/dist/esm/excel-parser/theme-default.js +19 -0
- package/dist/esm/excel-parser/types.d.ts +365 -0
- package/dist/esm/excel-parser/types.d.ts.map +1 -0
- package/dist/esm/excel-parser/types.js +59 -0
- package/dist/esm/excel-parser/utils.d.ts +6 -0
- package/dist/esm/excel-parser/utils.d.ts.map +1 -0
- package/dist/esm/excel-parser/utils.js +25 -0
- package/dist/esm/excel-parser/workbook.d.ts +51 -0
- package/dist/esm/excel-parser/workbook.d.ts.map +1 -0
- package/dist/esm/excel-parser/workbook.js +192 -0
- package/dist/esm/excel-parser/worker.d.ts +2 -0
- package/dist/esm/excel-parser/worker.d.ts.map +1 -0
- package/dist/esm/excel-parser/worker.js +862 -0
- package/dist/esm/excel-parser/zip-parser-streaming.d.ts +13 -0
- package/dist/esm/excel-parser/zip-parser-streaming.d.ts.map +1 -0
- package/dist/esm/excel-parser/zip-parser-streaming.js +119 -0
- package/dist/esm/excel-parser/zip-parser.d.ts +11 -0
- package/dist/esm/excel-parser/zip-parser.d.ts.map +1 -0
- package/dist/esm/excel-parser/zip-parser.js +43 -0
- package/dist/esm/exporter/invalid-data-validation.d.ts +19 -0
- package/dist/esm/exporter/invalid-data-validation.d.ts.map +1 -0
- package/dist/esm/exporter/invalid-data-validation.js +37 -0
- package/dist/esm/exporter/ods/ods-export.d.ts +26 -0
- package/dist/esm/exporter/ods/ods-export.d.ts.map +1 -0
- package/dist/esm/exporter/ods/ods-export.js +3238 -0
- package/dist/esm/exporter/ods/sparkline-builder.d.ts +33 -0
- package/dist/esm/exporter/ods/sparkline-builder.d.ts.map +1 -0
- package/dist/esm/exporter/ods/sparkline-builder.js +165 -0
- package/dist/esm/exporter/xlsx/chart-builder.d.ts +3 -0
- package/dist/esm/exporter/xlsx/chart-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/chart-builder.js +1805 -0
- package/dist/esm/exporter/xlsx/chart-templates.d.ts +1781 -0
- package/dist/esm/exporter/xlsx/chart-templates.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/chart-templates.js +1798 -0
- package/dist/esm/exporter/xlsx/future-functions.d.ts +10 -0
- package/dist/esm/exporter/xlsx/future-functions.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/future-functions.js +264 -0
- package/dist/esm/exporter/xlsx/pivot-builder.d.ts +58 -0
- package/dist/esm/exporter/xlsx/pivot-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/pivot-builder.js +230 -0
- package/dist/esm/exporter/xlsx/power-query-builder.d.ts +26 -0
- package/dist/esm/exporter/xlsx/power-query-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/power-query-builder.js +257 -0
- package/dist/esm/exporter/xlsx/slicer-builder.d.ts +11 -0
- package/dist/esm/exporter/xlsx/slicer-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/slicer-builder.js +84 -0
- package/dist/esm/exporter/xlsx/sparkline-builder.d.ts +61 -0
- package/dist/esm/exporter/xlsx/sparkline-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/sparkline-builder.js +437 -0
- package/dist/esm/exporter/xlsx/style-builder.d.ts +93 -0
- package/dist/esm/exporter/xlsx/style-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/style-builder.js +795 -0
- package/dist/esm/exporter/xlsx/threaded-comments-builder.d.ts +58 -0
- package/dist/esm/exporter/xlsx/threaded-comments-builder.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/threaded-comments-builder.js +175 -0
- package/dist/esm/exporter/xlsx/xlsx-export.d.ts +121 -0
- package/dist/esm/exporter/xlsx/xlsx-export.d.ts.map +1 -0
- package/dist/esm/exporter/xlsx/xlsx-export.js +4062 -0
- package/dist/esm/helpers/theme-xml-generator.d.ts +8 -0
- package/dist/esm/helpers/theme-xml-generator.d.ts.map +1 -0
- package/dist/esm/helpers/theme-xml-generator.js +33 -0
- package/dist/esm/helpers.d.ts +34 -0
- package/dist/esm/helpers.d.ts.map +1 -0
- package/dist/esm/helpers.js +182 -0
- package/dist/esm/index.d.ts +16 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/indexed-colors.d.ts +2 -0
- package/dist/esm/indexed-colors.d.ts.map +1 -0
- package/dist/esm/indexed-colors.js +75 -0
- package/dist/esm/ods-export.d.ts +24 -0
- package/dist/esm/ods-export.d.ts.map +1 -0
- package/dist/esm/ods-export.js +12 -0
- package/dist/esm/parse.d.ts +24 -0
- package/dist/esm/parse.d.ts.map +1 -0
- package/dist/esm/parse.js +55 -0
- package/dist/esm/power-query.d.ts +41 -0
- package/dist/esm/power-query.d.ts.map +1 -0
- package/dist/esm/power-query.js +19 -0
- package/dist/esm/server.d.ts +9 -0
- package/dist/esm/server.d.ts.map +1 -0
- package/dist/esm/server.js +8 -0
- package/dist/esm/theme1.d.ts +3 -0
- package/dist/esm/theme1.d.ts.map +1 -0
- package/dist/esm/theme1.js +2 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/esm/types.d.ts +14 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +14 -0
- package/dist/esm/vitest.config.d.ts +3 -0
- package/dist/esm/vitest.config.d.ts.map +1 -0
- package/dist/esm/vitest.config.js +16 -0
- package/package.json +62 -0
- package/xlsx.d.ts +52 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip the `_xlfn.` / `_xlws.` / `_xludf.` prefixes and re-add the correct
|
|
3
|
+
* one to every future-function call in `formula`. Quoted spans are copied
|
|
4
|
+
* verbatim so string literals (`"…"`) and quoted sheet names (`'…'`) keep
|
|
5
|
+
* their original text; a doubled quote inside a span is an escaped quote.
|
|
6
|
+
* Because the strip pass runs first, already-qualified input comes out
|
|
7
|
+
* qualified exactly once.
|
|
8
|
+
*/
|
|
9
|
+
export declare function qualifyFutureFunctions(formula: string): string;
|
|
10
|
+
//# sourceMappingURL=future-functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"future-functions.d.ts","sourceRoot":"","sources":["../../../../exporter/xlsx/future-functions.ts"],"names":[],"mappings":"AAkPA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA6B9D"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Excel "future functions" — functions added after the Excel 2007 (.xlsx)
|
|
3
|
+
* file format was frozen. [MS-XLSX] requires them to be written into sheet
|
|
4
|
+
* XML behind a `_xlfn.` namespace prefix (`_xlfn._xlws.` for the
|
|
5
|
+
* worksheet-scoped dynamic-array functions); the UI never shows the prefix.
|
|
6
|
+
* Written bare, Excel does not resolve the name: it renders the call behind
|
|
7
|
+
* the implicit-intersection operator (`=@DAYS(...)`) and evaluates `#NAME?`.
|
|
8
|
+
*
|
|
9
|
+
* The list follows Microsoft's documentation of `_xlfn.`-prefixed functions
|
|
10
|
+
* ("Issue: An _xlfn. prefix is displayed in front of a function in a
|
|
11
|
+
* formula", support.microsoft.com) plus the dynamic-array / LAMBDA-era and
|
|
12
|
+
* 2024 additions that ship with the same prefix convention.
|
|
13
|
+
*/
|
|
14
|
+
const FUTURE_FUNCTION_NAMES = [
|
|
15
|
+
"ACOT",
|
|
16
|
+
"ACOTH",
|
|
17
|
+
"AGGREGATE",
|
|
18
|
+
"ANCHORARRAY",
|
|
19
|
+
"ARABIC",
|
|
20
|
+
"ARRAYTOTEXT",
|
|
21
|
+
"BASE",
|
|
22
|
+
"BETA.DIST",
|
|
23
|
+
"BETA.INV",
|
|
24
|
+
"BINOM.DIST",
|
|
25
|
+
"BINOM.DIST.RANGE",
|
|
26
|
+
"BINOM.INV",
|
|
27
|
+
"BITAND",
|
|
28
|
+
"BITLSHIFT",
|
|
29
|
+
"BITOR",
|
|
30
|
+
"BITRSHIFT",
|
|
31
|
+
"BITXOR",
|
|
32
|
+
"BYCOL",
|
|
33
|
+
"BYROW",
|
|
34
|
+
"CEILING.MATH",
|
|
35
|
+
"CEILING.PRECISE",
|
|
36
|
+
"CHISQ.DIST",
|
|
37
|
+
"CHISQ.DIST.RT",
|
|
38
|
+
"CHISQ.INV",
|
|
39
|
+
"CHISQ.INV.RT",
|
|
40
|
+
"CHISQ.TEST",
|
|
41
|
+
"CHOOSECOLS",
|
|
42
|
+
"CHOOSEROWS",
|
|
43
|
+
"COMBINA",
|
|
44
|
+
"CONCAT",
|
|
45
|
+
"CONFIDENCE.NORM",
|
|
46
|
+
"CONFIDENCE.T",
|
|
47
|
+
"COT",
|
|
48
|
+
"COTH",
|
|
49
|
+
"COVARIANCE.P",
|
|
50
|
+
"COVARIANCE.S",
|
|
51
|
+
"CSC",
|
|
52
|
+
"CSCH",
|
|
53
|
+
"DAYS",
|
|
54
|
+
"DECIMAL",
|
|
55
|
+
"DETECTLANGUAGE",
|
|
56
|
+
"DROP",
|
|
57
|
+
"ENCODEURL",
|
|
58
|
+
"ERF.PRECISE",
|
|
59
|
+
"ERFC.PRECISE",
|
|
60
|
+
"EXPAND",
|
|
61
|
+
"EXPON.DIST",
|
|
62
|
+
"F.DIST",
|
|
63
|
+
"F.DIST.RT",
|
|
64
|
+
"F.INV",
|
|
65
|
+
"F.INV.RT",
|
|
66
|
+
"F.TEST",
|
|
67
|
+
"FIELDVALUE",
|
|
68
|
+
"FILTER",
|
|
69
|
+
"FILTERXML",
|
|
70
|
+
"FLOOR.MATH",
|
|
71
|
+
"FLOOR.PRECISE",
|
|
72
|
+
"FORECAST.ETS",
|
|
73
|
+
"FORECAST.ETS.CONFINT",
|
|
74
|
+
"FORECAST.ETS.SEASONALITY",
|
|
75
|
+
"FORECAST.ETS.STAT",
|
|
76
|
+
"FORECAST.LINEAR",
|
|
77
|
+
"FORMULATEXT",
|
|
78
|
+
"GAMMA",
|
|
79
|
+
"GAMMA.DIST",
|
|
80
|
+
"GAMMA.INV",
|
|
81
|
+
"GAMMALN.PRECISE",
|
|
82
|
+
"GAUSS",
|
|
83
|
+
"GROUPBY",
|
|
84
|
+
"HSTACK",
|
|
85
|
+
"HYPGEOM.DIST",
|
|
86
|
+
"IFNA",
|
|
87
|
+
"IFS",
|
|
88
|
+
"IMAGE",
|
|
89
|
+
"IMCOSH",
|
|
90
|
+
"IMCOT",
|
|
91
|
+
"IMCSC",
|
|
92
|
+
"IMCSCH",
|
|
93
|
+
"IMSEC",
|
|
94
|
+
"IMSECH",
|
|
95
|
+
"IMSINH",
|
|
96
|
+
"IMTAN",
|
|
97
|
+
"ISFORMULA",
|
|
98
|
+
"ISOMITTED",
|
|
99
|
+
"ISOWEEKNUM",
|
|
100
|
+
"LAMBDA",
|
|
101
|
+
"LET",
|
|
102
|
+
"LOGNORM.DIST",
|
|
103
|
+
"LOGNORM.INV",
|
|
104
|
+
"MAKEARRAY",
|
|
105
|
+
"MAP",
|
|
106
|
+
"MAXIFS",
|
|
107
|
+
"MINIFS",
|
|
108
|
+
"MODE.MULT",
|
|
109
|
+
"MODE.SNGL",
|
|
110
|
+
"MUNIT",
|
|
111
|
+
"NEGBINOM.DIST",
|
|
112
|
+
"NETWORKDAYS.INTL",
|
|
113
|
+
"NORM.DIST",
|
|
114
|
+
"NORM.INV",
|
|
115
|
+
"NORM.S.DIST",
|
|
116
|
+
"NORM.S.INV",
|
|
117
|
+
"NUMBERVALUE",
|
|
118
|
+
"PDURATION",
|
|
119
|
+
"PERCENTILE.EXC",
|
|
120
|
+
"PERCENTILE.INC",
|
|
121
|
+
"PERCENTOF",
|
|
122
|
+
"PERCENTRANK.EXC",
|
|
123
|
+
"PERCENTRANK.INC",
|
|
124
|
+
"PERMUTATIONA",
|
|
125
|
+
"PHI",
|
|
126
|
+
"PIVOTBY",
|
|
127
|
+
"POISSON.DIST",
|
|
128
|
+
"QUARTILE.EXC",
|
|
129
|
+
"QUARTILE.INC",
|
|
130
|
+
"QUERYSTRING",
|
|
131
|
+
"RANDARRAY",
|
|
132
|
+
"RANK.AVG",
|
|
133
|
+
"RANK.EQ",
|
|
134
|
+
"REDUCE",
|
|
135
|
+
"REGEXEXTRACT",
|
|
136
|
+
"REGEXREPLACE",
|
|
137
|
+
"REGEXTEST",
|
|
138
|
+
"RRI",
|
|
139
|
+
"SCAN",
|
|
140
|
+
"SEC",
|
|
141
|
+
"SECH",
|
|
142
|
+
"SEQUENCE",
|
|
143
|
+
"SHEET",
|
|
144
|
+
"SHEETS",
|
|
145
|
+
"SINGLE",
|
|
146
|
+
"SKEW.P",
|
|
147
|
+
"SORT",
|
|
148
|
+
"SORTBY",
|
|
149
|
+
"STDEV.P",
|
|
150
|
+
"STDEV.S",
|
|
151
|
+
"STOCKHISTORY",
|
|
152
|
+
"SWITCH",
|
|
153
|
+
"T.DIST",
|
|
154
|
+
"T.DIST.2T",
|
|
155
|
+
"T.DIST.RT",
|
|
156
|
+
"T.INV",
|
|
157
|
+
"T.INV.2T",
|
|
158
|
+
"T.TEST",
|
|
159
|
+
"TAKE",
|
|
160
|
+
"TEXTAFTER",
|
|
161
|
+
"TEXTBEFORE",
|
|
162
|
+
"TEXTJOIN",
|
|
163
|
+
"TEXTSPLIT",
|
|
164
|
+
"TOCOL",
|
|
165
|
+
"TOROW",
|
|
166
|
+
"TRANSLATE",
|
|
167
|
+
"TRIMRANGE",
|
|
168
|
+
"UNICHAR",
|
|
169
|
+
"UNICODE",
|
|
170
|
+
"UNIQUE",
|
|
171
|
+
"VALUETOTEXT",
|
|
172
|
+
"VAR.P",
|
|
173
|
+
"VAR.S",
|
|
174
|
+
"VSTACK",
|
|
175
|
+
"WEBSERVICE",
|
|
176
|
+
"WEIBULL.DIST",
|
|
177
|
+
"WORKDAY.INTL",
|
|
178
|
+
"WRAPCOLS",
|
|
179
|
+
"WRAPROWS",
|
|
180
|
+
"XLOOKUP",
|
|
181
|
+
"XMATCH",
|
|
182
|
+
"XOR",
|
|
183
|
+
"Z.TEST",
|
|
184
|
+
];
|
|
185
|
+
/**
|
|
186
|
+
* Future functions that Excel writes behind the worksheet-scope prefix
|
|
187
|
+
* (`_xlfn._xlws.`) rather than plain `_xlfn.` — the dynamic-array functions
|
|
188
|
+
* that also exist as worksheet-only names.
|
|
189
|
+
*/
|
|
190
|
+
const WORKSHEET_SCOPED_FUTURE_FUNCTIONS = new Set([
|
|
191
|
+
"FILTER",
|
|
192
|
+
"SORT",
|
|
193
|
+
]);
|
|
194
|
+
const QUALIFIED_BY_NAME = new Map(FUTURE_FUNCTION_NAMES.map((name) => [
|
|
195
|
+
name,
|
|
196
|
+
WORKSHEET_SCOPED_FUTURE_FUNCTIONS.has(name)
|
|
197
|
+
? `_xlfn._xlws.${name}`
|
|
198
|
+
: `_xlfn.${name}`,
|
|
199
|
+
]));
|
|
200
|
+
// Longest names first so `T.DIST.2T` wins over `T.DIST`. The match must be
|
|
201
|
+
// followed by `(` — a bare name (e.g. the defined name `DAYS`) is not a call.
|
|
202
|
+
const FUTURE_FUNCTION_REGEX = new RegExp("(" +
|
|
203
|
+
[...FUTURE_FUNCTION_NAMES]
|
|
204
|
+
.sort((a, b) => b.length - a.length)
|
|
205
|
+
.map((name) => name.replace(/\./g, "\\."))
|
|
206
|
+
.join("|") +
|
|
207
|
+
")(\\s*\\()", "gi");
|
|
208
|
+
// `\b` is not enough of a left boundary: it would match the `DAYS` in
|
|
209
|
+
// `_xlfn.DAYS` and in `MYDAYS`. The preceding character is checked by offset
|
|
210
|
+
// instead of being consumed by the pattern, so nested calls
|
|
211
|
+
// (`SORT(FILTER(...))`) still match after the enclosing one.
|
|
212
|
+
const FUTURE_FUNCTION_LEFT_BOUNDARY = /[A-Za-z0-9_.$]/;
|
|
213
|
+
function qualifySegment(segment) {
|
|
214
|
+
const stripped = segment
|
|
215
|
+
.replace(/_xlfn\./gi, "")
|
|
216
|
+
.replace(/_xlws\./gi, "")
|
|
217
|
+
.replace(/_xludf\./gi, "");
|
|
218
|
+
return stripped.replace(FUTURE_FUNCTION_REGEX, (match, name, open, offset) => {
|
|
219
|
+
if (offset > 0 &&
|
|
220
|
+
FUTURE_FUNCTION_LEFT_BOUNDARY.test(stripped[offset - 1])) {
|
|
221
|
+
return match;
|
|
222
|
+
}
|
|
223
|
+
const qualified = QUALIFIED_BY_NAME.get(name.toUpperCase());
|
|
224
|
+
return qualified ? qualified + open : match;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Strip the `_xlfn.` / `_xlws.` / `_xludf.` prefixes and re-add the correct
|
|
229
|
+
* one to every future-function call in `formula`. Quoted spans are copied
|
|
230
|
+
* verbatim so string literals (`"…"`) and quoted sheet names (`'…'`) keep
|
|
231
|
+
* their original text; a doubled quote inside a span is an escaped quote.
|
|
232
|
+
* Because the strip pass runs first, already-qualified input comes out
|
|
233
|
+
* qualified exactly once.
|
|
234
|
+
*/
|
|
235
|
+
export function qualifyFutureFunctions(formula) {
|
|
236
|
+
let result = "";
|
|
237
|
+
let segmentStart = 0;
|
|
238
|
+
let index = 0;
|
|
239
|
+
while (index < formula.length) {
|
|
240
|
+
const char = formula[index];
|
|
241
|
+
if (char !== '"' && char !== "'") {
|
|
242
|
+
index++;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
result += qualifySegment(formula.slice(segmentStart, index));
|
|
246
|
+
let end = index + 1;
|
|
247
|
+
while (end < formula.length) {
|
|
248
|
+
if (formula[end] === char) {
|
|
249
|
+
if (formula[end + 1] === char) {
|
|
250
|
+
end += 2;
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
end++;
|
|
256
|
+
}
|
|
257
|
+
// An unterminated literal consumes the rest of the formula.
|
|
258
|
+
const literalEnd = end < formula.length ? end + 1 : formula.length;
|
|
259
|
+
result += formula.slice(index, literalEnd);
|
|
260
|
+
index = literalEnd;
|
|
261
|
+
segmentStart = literalEnd;
|
|
262
|
+
}
|
|
263
|
+
return result + qualifySegment(formula.slice(segmentStart));
|
|
264
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XLSX pivot table XML builders — Phase D2.
|
|
3
|
+
*
|
|
4
|
+
* Emits two XML families:
|
|
5
|
+
* 1. xl/pivotTables/pivotTable<N>.xml — layout
|
|
6
|
+
* 2. xl/pivotCache/pivotCacheDefinition<N>.xml — field definitions
|
|
7
|
+
*
|
|
8
|
+
* `xl/pivotCache/pivotCacheRecords<N>.xml` is intentionally omitted.
|
|
9
|
+
* We set `refreshOnLoad="1"` so Excel recomputes the cache from the
|
|
10
|
+
* live source range on open — avoids the "cache stale vs. source"
|
|
11
|
+
* desync that records would cause.
|
|
12
|
+
*
|
|
13
|
+
* INTEGRATION POINTS (need wiring in xlsx-export.ts):
|
|
14
|
+
* - Add `pivotTables: PivotTable[]` to ExportExcelProps
|
|
15
|
+
* - Group pivots by sheetId, similar to charts/slicers
|
|
16
|
+
* - For each pivot:
|
|
17
|
+
* • Generate pivotTable XML + pivotCacheDefinition XML
|
|
18
|
+
* • Add to zip at xl/pivotTables/pivotTable<N>.xml + xl/pivotCache/pivotCacheDefinition<N>.xml
|
|
19
|
+
* • Add pivotTable → pivotCacheDefinition relationship file
|
|
20
|
+
* • Add worksheet → pivotTable relationship
|
|
21
|
+
* • Add workbook → pivotCacheDefinition relationship (in workbook.xml.rels)
|
|
22
|
+
* • Add <pivotCaches> ref in workbook.xml
|
|
23
|
+
* • Add ContentTypes overrides for both pivotTable and pivotCacheDefinition
|
|
24
|
+
*
|
|
25
|
+
* The slicer-builder integration (lines 1-128 of slicer-builder.ts
|
|
26
|
+
* + ~100 lines in xlsx-export.ts) is the closest reference template.
|
|
27
|
+
*/
|
|
28
|
+
import type { PivotTable } from "@rowsncolumns/spreadsheet";
|
|
29
|
+
/**
|
|
30
|
+
* Build pivotCacheDefinition XML for a pivot. The cacheSource
|
|
31
|
+
* points at the live worksheet range; `refreshOnLoad="1"` makes
|
|
32
|
+
* Excel rebuild the cache when the user opens the file.
|
|
33
|
+
*
|
|
34
|
+
* @param pivot The PivotTable record
|
|
35
|
+
* @param sheetName Name of the sheet containing the source range
|
|
36
|
+
* @param fieldNames All source column headers (becomes <cacheFields>)
|
|
37
|
+
*/
|
|
38
|
+
export declare const buildPivotCacheDefinitionXml: (pivot: PivotTable, sheetName: string, fieldNames: string[]) => string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Build the pivotTable layout XML. Excel determines whether a cell
|
|
41
|
+
* is a "row label", "column label", or "data" by the field axes
|
|
42
|
+
* declared here.
|
|
43
|
+
*
|
|
44
|
+
* @param pivot The PivotTable record
|
|
45
|
+
* @param cacheId Numeric cache ID (matches workbook.xml's <pivotCaches>)
|
|
46
|
+
* @param fieldIndices Maps row/col/value field names → cacheField indices
|
|
47
|
+
*/
|
|
48
|
+
export declare const buildPivotTableXml: (pivot: PivotTable, cacheId: number, fieldIndices: Map<string, number>) => string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Build the pivotTable.xml.rels file (links the pivot to its
|
|
51
|
+
* cache definition).
|
|
52
|
+
*
|
|
53
|
+
* @param cacheRid Relationship id (e.g. "rId1")
|
|
54
|
+
* @param cacheTarget Path relative to pivotTable, e.g.
|
|
55
|
+
* "../pivotCache/pivotCacheDefinition1.xml"
|
|
56
|
+
*/
|
|
57
|
+
export declare const buildPivotTableRelsXml: (cacheRid: string, cacheTarget: string) => string;
|
|
58
|
+
//# sourceMappingURL=pivot-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pivot-builder.d.ts","sourceRoot":"","sources":["../../../../exporter/xlsx/pivot-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AA4D5D;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,UAAU,EACjB,WAAW,MAAM,EACjB,YAAY,MAAM,EAAE,KACnB,MAAM,GAAG,IAgCX,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,UAAU,EACjB,SAAS,MAAM,EACf,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAChC,MAAM,GAAG,IAkHX,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,MAAM,EAChB,aAAa,MAAM,KAClB,MAcF,CAAC"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { XMLBuilder } from "fast-xml-parser";
|
|
2
|
+
const xmlBuilder = new XMLBuilder({
|
|
3
|
+
ignoreAttributes: false,
|
|
4
|
+
attributeNamePrefix: "@_",
|
|
5
|
+
format: true,
|
|
6
|
+
indentBy: " ",
|
|
7
|
+
});
|
|
8
|
+
/**
|
|
9
|
+
* Convert numeric col/row to A1 notation. 1-indexed.
|
|
10
|
+
* e.g. (1, 1) → "A1", (28, 5) → "AB5".
|
|
11
|
+
*/
|
|
12
|
+
const a1 = (col, row) => {
|
|
13
|
+
let s = "";
|
|
14
|
+
let c = col;
|
|
15
|
+
while (c > 0) {
|
|
16
|
+
const rem = (c - 1) % 26;
|
|
17
|
+
s = String.fromCharCode(65 + rem) + s;
|
|
18
|
+
c = Math.floor((c - 1) / 26);
|
|
19
|
+
}
|
|
20
|
+
return `${s}${row}`;
|
|
21
|
+
};
|
|
22
|
+
const rangeRef = (range) => `${a1(range.startColumnIndex, range.startRowIndex)}:${a1(range.endColumnIndex, range.endRowIndex)}`;
|
|
23
|
+
/**
|
|
24
|
+
* Map our aggFunc → XLSX subtotal attribute.
|
|
25
|
+
*/
|
|
26
|
+
const aggToSubtotal = (agg) => {
|
|
27
|
+
const map = {
|
|
28
|
+
sum: "sum",
|
|
29
|
+
count: "countNums",
|
|
30
|
+
counta: "count",
|
|
31
|
+
avg: "average",
|
|
32
|
+
min: "min",
|
|
33
|
+
max: "max",
|
|
34
|
+
product: "product",
|
|
35
|
+
stddev: "stdDev",
|
|
36
|
+
stddevp: "stdDevp",
|
|
37
|
+
var: "var",
|
|
38
|
+
varp: "varp",
|
|
39
|
+
median: "average", // No native MEDIAN; fall back so Excel doesn't error.
|
|
40
|
+
countunique: "count",
|
|
41
|
+
};
|
|
42
|
+
return map[agg] ?? "sum";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Build pivotCacheDefinition XML for a pivot. The cacheSource
|
|
46
|
+
* points at the live worksheet range; `refreshOnLoad="1"` makes
|
|
47
|
+
* Excel rebuild the cache when the user opens the file.
|
|
48
|
+
*
|
|
49
|
+
* @param pivot The PivotTable record
|
|
50
|
+
* @param sheetName Name of the sheet containing the source range
|
|
51
|
+
* @param fieldNames All source column headers (becomes <cacheFields>)
|
|
52
|
+
*/
|
|
53
|
+
export const buildPivotCacheDefinitionXml = (pivot, sheetName, fieldNames) => {
|
|
54
|
+
if (!pivot.source)
|
|
55
|
+
return null;
|
|
56
|
+
const sourceRef = rangeRef(pivot.source);
|
|
57
|
+
const cacheFields = fieldNames.map((name) => ({
|
|
58
|
+
"@_name": name,
|
|
59
|
+
sharedItems: { "@_count": "0" },
|
|
60
|
+
}));
|
|
61
|
+
const doc = {
|
|
62
|
+
"?xml": { "@_version": "1.0", "@_encoding": "UTF-8", "@_standalone": "yes" },
|
|
63
|
+
pivotCacheDefinition: {
|
|
64
|
+
"@_xmlns": "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
65
|
+
"@_xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
66
|
+
"@_invalid": "1",
|
|
67
|
+
"@_refreshOnLoad": "1",
|
|
68
|
+
"@_refreshedBy": "Rows n Columns",
|
|
69
|
+
"@_recordCount": "0",
|
|
70
|
+
cacheSource: {
|
|
71
|
+
"@_type": "worksheet",
|
|
72
|
+
worksheetSource: {
|
|
73
|
+
"@_ref": sourceRef,
|
|
74
|
+
"@_sheet": sheetName,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
cacheFields: {
|
|
78
|
+
"@_count": String(cacheFields.length),
|
|
79
|
+
cacheField: cacheFields,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
return xmlBuilder.build(doc);
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Build the pivotTable layout XML. Excel determines whether a cell
|
|
87
|
+
* is a "row label", "column label", or "data" by the field axes
|
|
88
|
+
* declared here.
|
|
89
|
+
*
|
|
90
|
+
* @param pivot The PivotTable record
|
|
91
|
+
* @param cacheId Numeric cache ID (matches workbook.xml's <pivotCaches>)
|
|
92
|
+
* @param fieldIndices Maps row/col/value field names → cacheField indices
|
|
93
|
+
*/
|
|
94
|
+
export const buildPivotTableXml = (pivot, cacheId, fieldIndices) => {
|
|
95
|
+
if (!pivot.pivotRange)
|
|
96
|
+
return null;
|
|
97
|
+
const ref = rangeRef(pivot.pivotRange);
|
|
98
|
+
// pivotFields: one entry per cacheField, with axis attribute
|
|
99
|
+
// (axisRow / axisCol / dataField). Order = cacheField order.
|
|
100
|
+
const pivotFields = [];
|
|
101
|
+
// We don't know the full field universe here without the source
|
|
102
|
+
// schema. Best-effort: declare entries for the union of row/col/
|
|
103
|
+
// value fields and tag with the appropriate axis.
|
|
104
|
+
const fieldAxis = new Map();
|
|
105
|
+
for (const r of pivot.rows ?? []) {
|
|
106
|
+
const idx = fieldIndices.get(r.field);
|
|
107
|
+
if (idx != null)
|
|
108
|
+
fieldAxis.set(idx, "axisRow");
|
|
109
|
+
}
|
|
110
|
+
for (const c of pivot.columns ?? []) {
|
|
111
|
+
const idx = fieldIndices.get(c.field);
|
|
112
|
+
if (idx != null)
|
|
113
|
+
fieldAxis.set(idx, "axisCol");
|
|
114
|
+
}
|
|
115
|
+
for (const v of pivot.values ?? []) {
|
|
116
|
+
const idx = fieldIndices.get(v.field);
|
|
117
|
+
if (idx != null)
|
|
118
|
+
fieldAxis.set(idx, "dataField");
|
|
119
|
+
}
|
|
120
|
+
// Need to emit one <pivotField> per cacheField in order, even
|
|
121
|
+
// for unused fields (Excel requires the array shapes match).
|
|
122
|
+
// Caller passes us the full field set via fieldIndices.
|
|
123
|
+
const sortedFieldIndices = [...fieldIndices.entries()].sort((a, b) => a[1] - b[1]);
|
|
124
|
+
for (const [, idx] of sortedFieldIndices) {
|
|
125
|
+
const axis = fieldAxis.get(idx);
|
|
126
|
+
if (axis) {
|
|
127
|
+
pivotFields.push({ "@_axis": axis, "@_compact": "0", items: {} });
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
pivotFields.push({ "@_compact": "0" });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const rowFields = (pivot.rows ?? [])
|
|
134
|
+
.map((r) => fieldIndices.get(r.field))
|
|
135
|
+
.filter((i) => i != null)
|
|
136
|
+
.map((i) => ({ "@_x": String(i) }));
|
|
137
|
+
const colFields = (pivot.columns ?? [])
|
|
138
|
+
.map((c) => fieldIndices.get(c.field))
|
|
139
|
+
.filter((i) => i != null)
|
|
140
|
+
.map((i) => ({ "@_x": String(i) }));
|
|
141
|
+
const dataFields = (pivot.values ?? [])
|
|
142
|
+
.map((v) => {
|
|
143
|
+
const idx = fieldIndices.get(v.field);
|
|
144
|
+
if (idx == null)
|
|
145
|
+
return null;
|
|
146
|
+
return {
|
|
147
|
+
"@_name": v.displayName ?? `${v.aggFunc} of ${v.field}`,
|
|
148
|
+
"@_fld": String(idx),
|
|
149
|
+
"@_subtotal": aggToSubtotal(v.aggFunc),
|
|
150
|
+
};
|
|
151
|
+
})
|
|
152
|
+
.filter((d) => d !== null);
|
|
153
|
+
const doc = {
|
|
154
|
+
"?xml": { "@_version": "1.0", "@_encoding": "UTF-8", "@_standalone": "yes" },
|
|
155
|
+
pivotTableDefinition: {
|
|
156
|
+
"@_xmlns": "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
157
|
+
"@_name": pivot.name ?? `PivotTable${pivot.pivotId}`,
|
|
158
|
+
"@_cacheId": String(cacheId),
|
|
159
|
+
"@_dataOnRows": "0",
|
|
160
|
+
"@_applyNumberFormats": "0",
|
|
161
|
+
"@_applyBorderFormats": "0",
|
|
162
|
+
"@_applyFontFormats": "0",
|
|
163
|
+
"@_applyPatternFormats": "0",
|
|
164
|
+
"@_applyAlignmentFormats": "0",
|
|
165
|
+
"@_applyWidthHeightFormats": "1",
|
|
166
|
+
"@_dataCaption": "Values",
|
|
167
|
+
"@_updatedVersion": "8",
|
|
168
|
+
"@_minRefreshableVersion": "3",
|
|
169
|
+
"@_showCalcMbrs": "0",
|
|
170
|
+
"@_useAutoFormatting": "1",
|
|
171
|
+
"@_itemPrintTitles": "1",
|
|
172
|
+
"@_createdVersion": "8",
|
|
173
|
+
"@_indent": "0",
|
|
174
|
+
"@_outline": "1",
|
|
175
|
+
"@_outlineData": "1",
|
|
176
|
+
"@_multipleFieldFilters": "0",
|
|
177
|
+
"@_rowGrandTotals": pivot.showRowGrandTotals === false ? "0" : "1",
|
|
178
|
+
"@_colGrandTotals": pivot.showColumnGrandTotals === false ? "0" : "1",
|
|
179
|
+
location: {
|
|
180
|
+
"@_ref": ref,
|
|
181
|
+
"@_firstHeaderRow": "1",
|
|
182
|
+
"@_firstDataRow": "1",
|
|
183
|
+
"@_firstDataCol": "1",
|
|
184
|
+
},
|
|
185
|
+
pivotFields: pivotFields.length
|
|
186
|
+
? { "@_count": String(pivotFields.length), pivotField: pivotFields }
|
|
187
|
+
: undefined,
|
|
188
|
+
rowFields: rowFields.length
|
|
189
|
+
? { "@_count": String(rowFields.length), field: rowFields }
|
|
190
|
+
: undefined,
|
|
191
|
+
colFields: colFields.length
|
|
192
|
+
? { "@_count": String(colFields.length), field: colFields }
|
|
193
|
+
: undefined,
|
|
194
|
+
dataFields: dataFields.length
|
|
195
|
+
? { "@_count": String(dataFields.length), dataField: dataFields }
|
|
196
|
+
: undefined,
|
|
197
|
+
pivotTableStyleInfo: {
|
|
198
|
+
"@_name": "PivotStyleLight16",
|
|
199
|
+
"@_showRowHeaders": "1",
|
|
200
|
+
"@_showColHeaders": "1",
|
|
201
|
+
"@_showRowStripes": "0",
|
|
202
|
+
"@_showColStripes": "0",
|
|
203
|
+
"@_showLastColumn": "1",
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
return xmlBuilder.build(doc);
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Build the pivotTable.xml.rels file (links the pivot to its
|
|
211
|
+
* cache definition).
|
|
212
|
+
*
|
|
213
|
+
* @param cacheRid Relationship id (e.g. "rId1")
|
|
214
|
+
* @param cacheTarget Path relative to pivotTable, e.g.
|
|
215
|
+
* "../pivotCache/pivotCacheDefinition1.xml"
|
|
216
|
+
*/
|
|
217
|
+
export const buildPivotTableRelsXml = (cacheRid, cacheTarget) => {
|
|
218
|
+
const doc = {
|
|
219
|
+
"?xml": { "@_version": "1.0", "@_encoding": "UTF-8", "@_standalone": "yes" },
|
|
220
|
+
Relationships: {
|
|
221
|
+
"@_xmlns": "http://schemas.openxmlformats.org/package/2006/relationships",
|
|
222
|
+
Relationship: {
|
|
223
|
+
"@_Id": cacheRid,
|
|
224
|
+
"@_Type": "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition",
|
|
225
|
+
"@_Target": cacheTarget,
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
return xmlBuilder.build(doc);
|
|
230
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Power Query part re-emission — the export half of the parser's `getPowerQuery()` preservation,
|
|
3
|
+
* and the JS mirror of the Rust engine's `rnc-export` `inject_power_query` pass (same rules, same
|
|
4
|
+
* envelope shape).
|
|
5
|
+
*
|
|
6
|
+
* Runs as a post-pass over the exporter's assembled `files` map (just before zipping):
|
|
7
|
+
*
|
|
8
|
+
* - `customXml/item{N}.xml` (the `<DataMashup>` blob) + `customXml/itemProps{N}.xml` + the item's
|
|
9
|
+
* rels, related from `xl/workbook.xml`.
|
|
10
|
+
* - `xl/connections.xml`, verbatim.
|
|
11
|
+
* - `xl/queryTables/queryTable{N}.xml`, re-attached to the regenerated table part when the exported
|
|
12
|
+
* table still matches the imported one (same `displayName`, same ordered column names): the table
|
|
13
|
+
* part gains `tableType="queryTable"`, its `<tableColumn>`s get their ORIGINAL ids back (the
|
|
14
|
+
* verbatim queryTable part references them) plus their `queryTableFieldId`s, and a
|
|
15
|
+
* table→queryTable rel is written. A table that was renamed or had columns
|
|
16
|
+
* added/removed/reordered degrades to a plain table (its queryTable part is dropped) while the
|
|
17
|
+
* query itself (DataMashup + connection) still round-trips — Excel's own
|
|
18
|
+
* connection-without-load-target state.
|
|
19
|
+
*/
|
|
20
|
+
import { type PowerQueryParts } from "../../power-query";
|
|
21
|
+
/**
|
|
22
|
+
* Apply the preserved Power Query parts onto the exporter's `files` map (part name → bytes).
|
|
23
|
+
* No-op when the envelope is empty, keeping every other export byte-for-byte unchanged.
|
|
24
|
+
*/
|
|
25
|
+
export declare const applyPowerQueryParts: (files: Record<string, Uint8Array>, powerQuery: PowerQueryParts | null | undefined) => void;
|
|
26
|
+
//# sourceMappingURL=power-query-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"power-query-builder.d.ts","sourceRoot":"","sources":["../../../../exporter/xlsx/power-query-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,mBAAmB,CAAC;AAuB3B;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACjC,YAAY,eAAe,GAAG,IAAI,GAAG,SAAS,KAC7C,IAqHF,CAAC"}
|