@odoo/o-spreadsheet 17.0.72 → 17.0.73

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.
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 17.0.72
6
- * @date 2025-09-05T07:33:34.433Z
7
- * @hash 8c68f3d
5
+ * @version 17.0.73
6
+ * @date 2025-09-11T08:40:46.367Z
7
+ * @hash a11c622
8
8
  */
9
9
 
10
10
  'use strict';
@@ -31666,7 +31666,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
31666
31666
  ];
31667
31667
  const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
31668
31668
  const SUPPORTED_FONTS = ["Arial"];
31669
- const SUPPORTED_FILL_PATTERNS = ["solid"];
31669
+ const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
31670
31670
  const SUPPORTED_CF_TYPES = [
31671
31671
  "expression",
31672
31672
  "cellIs",
@@ -31850,7 +31850,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
31850
31850
  };
31851
31851
  /** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
31852
31852
  const XLSX_FORMATS_CONVERSION_MAP = {
31853
- 0: "",
31853
+ 0: "General",
31854
31854
  1: "0",
31855
31855
  2: "0.00",
31856
31856
  3: "#,#00",
@@ -32149,11 +32149,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
32149
32149
  * Excel format are defined in openXML §18.8.31
32150
32150
  */
32151
32151
  function convertXlsxFormat(numFmtId, formats, warningManager) {
32152
- if (numFmtId === 0) {
32153
- return undefined;
32154
- }
32155
32152
  // Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
32156
32153
  let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
32154
+ if (format === "General") {
32155
+ return undefined;
32156
+ }
32157
32157
  if (format) {
32158
32158
  try {
32159
32159
  let convertedFormat = format.replace(/(.*?);.*/, "$1"); // only take first part of multi-part format
@@ -34455,10 +34455,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
34455
34455
  });
34456
34456
  }
34457
34457
  extractRows(worksheet) {
34458
+ const spilledCells = new Set();
34458
34459
  return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
34459
34460
  return {
34460
34461
  index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
34461
- cells: this.extractCells(rowElement),
34462
+ cells: this.extractCells(rowElement, spilledCells),
34462
34463
  height: this.extractAttr(rowElement, "ht")?.asNum(),
34463
34464
  customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
34464
34465
  hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
@@ -34466,14 +34467,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
34466
34467
  };
34467
34468
  });
34468
34469
  }
34469
- extractCells(row) {
34470
+ extractCells(row, spilledCells) {
34470
34471
  return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
34472
+ const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
34473
+ const formula = this.extractCellFormula(cellElement);
34474
+ if (formula?.ref && formula.sharedIndex === undefined) {
34475
+ const zone = toZone(formula.ref);
34476
+ for (const { col, row } of positions(zone)) {
34477
+ const followerXc = toXC(col, row);
34478
+ if (followerXc !== xc) {
34479
+ spilledCells.add(followerXc);
34480
+ }
34481
+ }
34482
+ }
34483
+ const isSpilled = spilledCells.has(xc);
34471
34484
  return {
34472
- xc: this.extractAttr(cellElement, "r", { required: true })?.asString(),
34485
+ xc,
34473
34486
  styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
34474
34487
  type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
34475
- value: this.extractChildTextContent(cellElement, "v"),
34476
- formula: this.extractCellFormula(cellElement),
34488
+ value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
34489
+ formula: isSpilled ? undefined : formula,
34477
34490
  };
34478
34491
  });
34479
34492
  }
@@ -34481,11 +34494,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
34481
34494
  const formulaElement = this.querySelector(cellElement, "f");
34482
34495
  if (!formulaElement)
34483
34496
  return undefined;
34484
- return {
34485
- content: this.extractTextContent(formulaElement),
34486
- sharedIndex: this.extractAttr(formulaElement, "si")?.asNum(),
34487
- ref: this.extractAttr(formulaElement, "ref")?.asString(),
34488
- };
34497
+ const content = this.extractTextContent(formulaElement);
34498
+ const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
34499
+ const ref = this.extractAttr(formulaElement, "ref")?.asString();
34500
+ // This is the case of spilled cells of array formulas where <f> is empty
34501
+ if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
34502
+ return undefined;
34503
+ }
34504
+ return { content, sharedIndex, ref };
34489
34505
  }
34490
34506
  extractHyperLinks(worksheet) {
34491
34507
  return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
@@ -45519,7 +45535,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
45519
45535
  queuedBordersToAdd = {};
45520
45536
  queuedCFChanges = {};
45521
45537
  queuedDVChanges = {};
45522
- constructor(zones, operation, getters, dispatch, selection) {
45538
+ constructor(zones, operation, getters, dispatch, selection, mode = "copyPaste") {
45523
45539
  super(operation, getters, dispatch, selection);
45524
45540
  if (!zones.length) {
45525
45541
  this.cells = [[]];
@@ -45549,7 +45565,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
45549
45565
  const spreader = getters.getArrayFormulaSpreadingOn(position);
45550
45566
  let cell = getters.getCell(position);
45551
45567
  const evaluatedCell = getters.getEvaluatedCell(position);
45552
- if (spreader) {
45568
+ if (mode !== "shiftCells" && spreader) {
45553
45569
  const isSpreaderCopied = rowsIndex.includes(spreader.row) && columnsIndex.includes(spreader.col);
45554
45570
  const content = isSpreaderCopied
45555
45571
  ? ""
@@ -49110,12 +49126,12 @@ class ClipboardPlugin extends UIPlugin {
49110
49126
  }
49111
49127
  case "INSERT_CELL": {
49112
49128
  const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
49113
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49129
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49114
49130
  return state.isPasteAllowed(paste);
49115
49131
  }
49116
49132
  case "DELETE_CELL": {
49117
49133
  const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
49118
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49134
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49119
49135
  return state.isPasteAllowed(paste);
49120
49136
  }
49121
49137
  case "ACTIVATE_PAINT_FORMAT": {
@@ -49196,13 +49212,13 @@ class ClipboardPlugin extends UIPlugin {
49196
49212
  });
49197
49213
  break;
49198
49214
  }
49199
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49215
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49200
49216
  state.paste(paste);
49201
49217
  break;
49202
49218
  }
49203
49219
  case "INSERT_CELL": {
49204
49220
  const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
49205
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49221
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49206
49222
  state.paste(paste);
49207
49223
  break;
49208
49224
  }
@@ -49352,8 +49368,8 @@ class ClipboardPlugin extends UIPlugin {
49352
49368
  }
49353
49369
  return { cut: [cut], paste: [paste] };
49354
49370
  }
49355
- getClipboardStateForCopyCells(zones, operation) {
49356
- return new ClipboardCellsState(zones, operation, this.getters, this.dispatch, this.selection);
49371
+ getClipboardStateForCopyCells(zones, operation, mode = "copyPaste") {
49372
+ return new ClipboardCellsState(zones, operation, this.getters, this.dispatch, this.selection, mode);
49357
49373
  }
49358
49374
  /**
49359
49375
  * Get the clipboard state from the given zones.
@@ -50923,7 +50939,7 @@ class GridSelectionPlugin extends UIPlugin {
50923
50939
  bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
50924
50940
  },
50925
50941
  ];
50926
- const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
50942
+ const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection, "shiftCells");
50927
50943
  const base = isBasedBefore ? cmd.base : cmd.base + 1;
50928
50944
  const pasteTarget = [
50929
50945
  {
@@ -58475,6 +58491,6 @@ exports.setTranslationMethod = setTranslationMethod;
58475
58491
  exports.tokenize = tokenize;
58476
58492
 
58477
58493
 
58478
- __info__.version = "17.0.72";
58479
- __info__.date = "2025-09-05T07:33:34.433Z";
58480
- __info__.hash = "8c68f3d";
58494
+ __info__.version = "17.0.73";
58495
+ __info__.date = "2025-09-11T08:40:46.367Z";
58496
+ __info__.hash = "a11c622";
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 17.0.72
6
- * @date 2025-09-05T07:33:34.433Z
7
- * @hash 8c68f3d
5
+ * @version 17.0.73
6
+ * @date 2025-09-11T08:40:46.367Z
7
+ * @hash a11c622
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -31664,7 +31664,7 @@ const SUPPORTED_HORIZONTAL_ALIGNMENTS = [
31664
31664
  ];
31665
31665
  const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
31666
31666
  const SUPPORTED_FONTS = ["Arial"];
31667
- const SUPPORTED_FILL_PATTERNS = ["solid"];
31667
+ const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
31668
31668
  const SUPPORTED_CF_TYPES = [
31669
31669
  "expression",
31670
31670
  "cellIs",
@@ -31848,7 +31848,7 @@ const SUBTOTAL_FUNCTION_CONVERSION_MAP = {
31848
31848
  };
31849
31849
  /** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
31850
31850
  const XLSX_FORMATS_CONVERSION_MAP = {
31851
- 0: "",
31851
+ 0: "General",
31852
31852
  1: "0",
31853
31853
  2: "0.00",
31854
31854
  3: "#,#00",
@@ -32147,11 +32147,11 @@ const XLSX_DATE_FORMAT_REGEX = /^(yy|yyyy|m{1,5}|d{1,4}|h{1,2}|s{1,2}|am\/pm|a\/
32147
32147
  * Excel format are defined in openXML §18.8.31
32148
32148
  */
32149
32149
  function convertXlsxFormat(numFmtId, formats, warningManager) {
32150
- if (numFmtId === 0) {
32151
- return undefined;
32152
- }
32153
32150
  // Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
32154
32151
  let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
32152
+ if (format === "General") {
32153
+ return undefined;
32154
+ }
32155
32155
  if (format) {
32156
32156
  try {
32157
32157
  let convertedFormat = format.replace(/(.*?);.*/, "$1"); // only take first part of multi-part format
@@ -34453,10 +34453,11 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
34453
34453
  });
34454
34454
  }
34455
34455
  extractRows(worksheet) {
34456
+ const spilledCells = new Set();
34456
34457
  return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
34457
34458
  return {
34458
34459
  index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
34459
- cells: this.extractCells(rowElement),
34460
+ cells: this.extractCells(rowElement, spilledCells),
34460
34461
  height: this.extractAttr(rowElement, "ht")?.asNum(),
34461
34462
  customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
34462
34463
  hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
@@ -34464,14 +34465,26 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
34464
34465
  };
34465
34466
  });
34466
34467
  }
34467
- extractCells(row) {
34468
+ extractCells(row, spilledCells) {
34468
34469
  return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
34470
+ const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
34471
+ const formula = this.extractCellFormula(cellElement);
34472
+ if (formula?.ref && formula.sharedIndex === undefined) {
34473
+ const zone = toZone(formula.ref);
34474
+ for (const { col, row } of positions(zone)) {
34475
+ const followerXc = toXC(col, row);
34476
+ if (followerXc !== xc) {
34477
+ spilledCells.add(followerXc);
34478
+ }
34479
+ }
34480
+ }
34481
+ const isSpilled = spilledCells.has(xc);
34469
34482
  return {
34470
- xc: this.extractAttr(cellElement, "r", { required: true })?.asString(),
34483
+ xc,
34471
34484
  styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
34472
34485
  type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
34473
- value: this.extractChildTextContent(cellElement, "v"),
34474
- formula: this.extractCellFormula(cellElement),
34486
+ value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
34487
+ formula: isSpilled ? undefined : formula,
34475
34488
  };
34476
34489
  });
34477
34490
  }
@@ -34479,11 +34492,14 @@ class XlsxSheetExtractor extends XlsxBaseExtractor {
34479
34492
  const formulaElement = this.querySelector(cellElement, "f");
34480
34493
  if (!formulaElement)
34481
34494
  return undefined;
34482
- return {
34483
- content: this.extractTextContent(formulaElement),
34484
- sharedIndex: this.extractAttr(formulaElement, "si")?.asNum(),
34485
- ref: this.extractAttr(formulaElement, "ref")?.asString(),
34486
- };
34495
+ const content = this.extractTextContent(formulaElement);
34496
+ const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
34497
+ const ref = this.extractAttr(formulaElement, "ref")?.asString();
34498
+ // This is the case of spilled cells of array formulas where <f> is empty
34499
+ if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
34500
+ return undefined;
34501
+ }
34502
+ return { content, sharedIndex, ref };
34487
34503
  }
34488
34504
  extractHyperLinks(worksheet) {
34489
34505
  return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
@@ -45517,7 +45533,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
45517
45533
  queuedBordersToAdd = {};
45518
45534
  queuedCFChanges = {};
45519
45535
  queuedDVChanges = {};
45520
- constructor(zones, operation, getters, dispatch, selection) {
45536
+ constructor(zones, operation, getters, dispatch, selection, mode = "copyPaste") {
45521
45537
  super(operation, getters, dispatch, selection);
45522
45538
  if (!zones.length) {
45523
45539
  this.cells = [[]];
@@ -45547,7 +45563,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
45547
45563
  const spreader = getters.getArrayFormulaSpreadingOn(position);
45548
45564
  let cell = getters.getCell(position);
45549
45565
  const evaluatedCell = getters.getEvaluatedCell(position);
45550
- if (spreader) {
45566
+ if (mode !== "shiftCells" && spreader) {
45551
45567
  const isSpreaderCopied = rowsIndex.includes(spreader.row) && columnsIndex.includes(spreader.col);
45552
45568
  const content = isSpreaderCopied
45553
45569
  ? ""
@@ -49108,12 +49124,12 @@ class ClipboardPlugin extends UIPlugin {
49108
49124
  }
49109
49125
  case "INSERT_CELL": {
49110
49126
  const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
49111
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49127
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49112
49128
  return state.isPasteAllowed(paste);
49113
49129
  }
49114
49130
  case "DELETE_CELL": {
49115
49131
  const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
49116
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49132
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49117
49133
  return state.isPasteAllowed(paste);
49118
49134
  }
49119
49135
  case "ACTIVATE_PAINT_FORMAT": {
@@ -49194,13 +49210,13 @@ class ClipboardPlugin extends UIPlugin {
49194
49210
  });
49195
49211
  break;
49196
49212
  }
49197
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49213
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49198
49214
  state.paste(paste);
49199
49215
  break;
49200
49216
  }
49201
49217
  case "INSERT_CELL": {
49202
49218
  const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
49203
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49219
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49204
49220
  state.paste(paste);
49205
49221
  break;
49206
49222
  }
@@ -49350,8 +49366,8 @@ class ClipboardPlugin extends UIPlugin {
49350
49366
  }
49351
49367
  return { cut: [cut], paste: [paste] };
49352
49368
  }
49353
- getClipboardStateForCopyCells(zones, operation) {
49354
- return new ClipboardCellsState(zones, operation, this.getters, this.dispatch, this.selection);
49369
+ getClipboardStateForCopyCells(zones, operation, mode = "copyPaste") {
49370
+ return new ClipboardCellsState(zones, operation, this.getters, this.dispatch, this.selection, mode);
49355
49371
  }
49356
49372
  /**
49357
49373
  * Get the clipboard state from the given zones.
@@ -50921,7 +50937,7 @@ class GridSelectionPlugin extends UIPlugin {
50921
50937
  bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
50922
50938
  },
50923
50939
  ];
50924
- const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
50940
+ const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection, "shiftCells");
50925
50941
  const base = isBasedBefore ? cmd.base : cmd.base + 1;
50926
50942
  const pasteTarget = [
50927
50943
  {
@@ -58438,6 +58454,6 @@ const constants = {
58438
58454
  export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
58439
58455
 
58440
58456
 
58441
- __info__.version = "17.0.72";
58442
- __info__.date = "2025-09-05T07:33:34.433Z";
58443
- __info__.hash = "8c68f3d";
58457
+ __info__.version = "17.0.73";
58458
+ __info__.date = "2025-09-11T08:40:46.367Z";
58459
+ __info__.hash = "a11c622";
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 17.0.72
6
- * @date 2025-09-05T07:33:34.433Z
7
- * @hash 8c68f3d
5
+ * @version 17.0.73
6
+ * @date 2025-09-11T08:40:46.367Z
7
+ * @hash a11c622
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -31665,7 +31665,7 @@
31665
31665
  ];
31666
31666
  const SUPPORTED_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
31667
31667
  const SUPPORTED_FONTS = ["Arial"];
31668
- const SUPPORTED_FILL_PATTERNS = ["solid"];
31668
+ const SUPPORTED_FILL_PATTERNS = ["solid", "none"];
31669
31669
  const SUPPORTED_CF_TYPES = [
31670
31670
  "expression",
31671
31671
  "cellIs",
@@ -31849,7 +31849,7 @@
31849
31849
  };
31850
31850
  /** Mapping between Excel format indexes (see XLSX_FORMAT_MAP) and some supported formats */
31851
31851
  const XLSX_FORMATS_CONVERSION_MAP = {
31852
- 0: "",
31852
+ 0: "General",
31853
31853
  1: "0",
31854
31854
  2: "0.00",
31855
31855
  3: "#,#00",
@@ -32148,11 +32148,11 @@
32148
32148
  * Excel format are defined in openXML §18.8.31
32149
32149
  */
32150
32150
  function convertXlsxFormat(numFmtId, formats, warningManager) {
32151
- if (numFmtId === 0) {
32152
- return undefined;
32153
- }
32154
32151
  // Format is either defined in the imported data, or the formatId is defined in openXML §18.8.30
32155
32152
  let format = XLSX_FORMATS_CONVERSION_MAP[numFmtId] || formats.find((f) => f.id === numFmtId)?.format;
32153
+ if (format === "General") {
32154
+ return undefined;
32155
+ }
32156
32156
  if (format) {
32157
32157
  try {
32158
32158
  let convertedFormat = format.replace(/(.*?);.*/, "$1"); // only take first part of multi-part format
@@ -34454,10 +34454,11 @@
34454
34454
  });
34455
34455
  }
34456
34456
  extractRows(worksheet) {
34457
+ const spilledCells = new Set();
34457
34458
  return this.mapOnElements({ parent: worksheet, query: "sheetData row" }, (rowElement) => {
34458
34459
  return {
34459
34460
  index: this.extractAttr(rowElement, "r", { required: true })?.asNum(),
34460
- cells: this.extractCells(rowElement),
34461
+ cells: this.extractCells(rowElement, spilledCells),
34461
34462
  height: this.extractAttr(rowElement, "ht")?.asNum(),
34462
34463
  customHeight: this.extractAttr(rowElement, "customHeight")?.asBool(),
34463
34464
  hidden: this.extractAttr(rowElement, "hidden")?.asBool(),
@@ -34465,14 +34466,26 @@
34465
34466
  };
34466
34467
  });
34467
34468
  }
34468
- extractCells(row) {
34469
+ extractCells(row, spilledCells) {
34469
34470
  return this.mapOnElements({ parent: row, query: "c" }, (cellElement) => {
34471
+ const xc = this.extractAttr(cellElement, "r", { required: true })?.asString();
34472
+ const formula = this.extractCellFormula(cellElement);
34473
+ if (formula?.ref && formula.sharedIndex === undefined) {
34474
+ const zone = toZone(formula.ref);
34475
+ for (const { col, row } of positions(zone)) {
34476
+ const followerXc = toXC(col, row);
34477
+ if (followerXc !== xc) {
34478
+ spilledCells.add(followerXc);
34479
+ }
34480
+ }
34481
+ }
34482
+ const isSpilled = spilledCells.has(xc);
34470
34483
  return {
34471
- xc: this.extractAttr(cellElement, "r", { required: true })?.asString(),
34484
+ xc,
34472
34485
  styleIndex: this.extractAttr(cellElement, "s")?.asNum(),
34473
34486
  type: CELL_TYPE_CONVERSION_MAP[this.extractAttr(cellElement, "t", { default: "n" })?.asString()],
34474
- value: this.extractChildTextContent(cellElement, "v"),
34475
- formula: this.extractCellFormula(cellElement),
34487
+ value: isSpilled ? undefined : this.extractChildTextContent(cellElement, "v") ?? undefined,
34488
+ formula: isSpilled ? undefined : formula,
34476
34489
  };
34477
34490
  });
34478
34491
  }
@@ -34480,11 +34493,14 @@
34480
34493
  const formulaElement = this.querySelector(cellElement, "f");
34481
34494
  if (!formulaElement)
34482
34495
  return undefined;
34483
- return {
34484
- content: this.extractTextContent(formulaElement),
34485
- sharedIndex: this.extractAttr(formulaElement, "si")?.asNum(),
34486
- ref: this.extractAttr(formulaElement, "ref")?.asString(),
34487
- };
34496
+ const content = this.extractTextContent(formulaElement);
34497
+ const sharedIndex = this.extractAttr(formulaElement, "si")?.asNum();
34498
+ const ref = this.extractAttr(formulaElement, "ref")?.asString();
34499
+ // This is the case of spilled cells of array formulas where <f> is empty
34500
+ if ((content === undefined || content.trim() === "") && sharedIndex === undefined) {
34501
+ return undefined;
34502
+ }
34503
+ return { content, sharedIndex, ref };
34488
34504
  }
34489
34505
  extractHyperLinks(worksheet) {
34490
34506
  return this.mapOnElements({ parent: worksheet, query: "hyperlink" }, (linkElement) => {
@@ -45518,7 +45534,7 @@
45518
45534
  queuedBordersToAdd = {};
45519
45535
  queuedCFChanges = {};
45520
45536
  queuedDVChanges = {};
45521
- constructor(zones, operation, getters, dispatch, selection) {
45537
+ constructor(zones, operation, getters, dispatch, selection, mode = "copyPaste") {
45522
45538
  super(operation, getters, dispatch, selection);
45523
45539
  if (!zones.length) {
45524
45540
  this.cells = [[]];
@@ -45548,7 +45564,7 @@
45548
45564
  const spreader = getters.getArrayFormulaSpreadingOn(position);
45549
45565
  let cell = getters.getCell(position);
45550
45566
  const evaluatedCell = getters.getEvaluatedCell(position);
45551
- if (spreader) {
45567
+ if (mode !== "shiftCells" && spreader) {
45552
45568
  const isSpreaderCopied = rowsIndex.includes(spreader.row) && columnsIndex.includes(spreader.col);
45553
45569
  const content = isSpreaderCopied
45554
45570
  ? ""
@@ -49109,12 +49125,12 @@
49109
49125
  }
49110
49126
  case "INSERT_CELL": {
49111
49127
  const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
49112
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49128
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49113
49129
  return state.isPasteAllowed(paste);
49114
49130
  }
49115
49131
  case "DELETE_CELL": {
49116
49132
  const { cut, paste } = this.getDeleteCellsTargets(cmd.zone, cmd.shiftDimension);
49117
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49133
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49118
49134
  return state.isPasteAllowed(paste);
49119
49135
  }
49120
49136
  case "ACTIVATE_PAINT_FORMAT": {
@@ -49195,13 +49211,13 @@
49195
49211
  });
49196
49212
  break;
49197
49213
  }
49198
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49214
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49199
49215
  state.paste(paste);
49200
49216
  break;
49201
49217
  }
49202
49218
  case "INSERT_CELL": {
49203
49219
  const { cut, paste } = this.getInsertCellsTargets(cmd.zone, cmd.shiftDimension);
49204
- const state = this.getClipboardStateForCopyCells(cut, "CUT");
49220
+ const state = this.getClipboardStateForCopyCells(cut, "CUT", "shiftCells");
49205
49221
  state.paste(paste);
49206
49222
  break;
49207
49223
  }
@@ -49351,8 +49367,8 @@
49351
49367
  }
49352
49368
  return { cut: [cut], paste: [paste] };
49353
49369
  }
49354
- getClipboardStateForCopyCells(zones, operation) {
49355
- return new ClipboardCellsState(zones, operation, this.getters, this.dispatch, this.selection);
49370
+ getClipboardStateForCopyCells(zones, operation, mode = "copyPaste") {
49371
+ return new ClipboardCellsState(zones, operation, this.getters, this.dispatch, this.selection, mode);
49356
49372
  }
49357
49373
  /**
49358
49374
  * Get the clipboard state from the given zones.
@@ -50922,7 +50938,7 @@
50922
50938
  bottom: !isCol ? end + deltaRow : this.getters.getNumberRows(cmd.sheetId) - 1,
50923
50939
  },
50924
50940
  ];
50925
- const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
50941
+ const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection, "shiftCells");
50926
50942
  const base = isBasedBefore ? cmd.base : cmd.base + 1;
50927
50943
  const pasteTarget = [
50928
50944
  {
@@ -58474,9 +58490,9 @@
58474
58490
  exports.tokenize = tokenize;
58475
58491
 
58476
58492
 
58477
- __info__.version = "17.0.72";
58478
- __info__.date = "2025-09-05T07:33:34.433Z";
58479
- __info__.hash = "8c68f3d";
58493
+ __info__.version = "17.0.73";
58494
+ __info__.date = "2025-09-11T08:40:46.367Z";
58495
+ __info__.hash = "a11c622";
58480
58496
 
58481
58497
 
58482
58498
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);