From dc43965070f17cd7a79f14a4f06ae708dddf0713 Mon Sep 17 00:00:00 2001 From: GoshaZotov Date: Mon, 6 Oct 2025 14:48:56 +0300 Subject: [PATCH 1/3] [se] Fix bug 75974 --- cell/model/WorkbookElems.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cell/model/WorkbookElems.js b/cell/model/WorkbookElems.js index 03be2a95dc..fefcbb78b7 100644 --- a/cell/model/WorkbookElems.js +++ b/cell/model/WorkbookElems.js @@ -16372,7 +16372,11 @@ function RangeDataManagerElem(bbox, data) }); } + let cellType = cell.getType(); let newVal = noData ? "#REF!" : cell.getValue(); + if (cellType === CellValueType.Number) { + newVal = cell.getNumberValue(); + } if (this.CellValue !== newVal) { isChanged = true; this.CellValue = newVal; @@ -16380,13 +16384,22 @@ function RangeDataManagerElem(bbox, data) var cellValueType = null; - switch (cell.getType()) { + switch (cellType) { case CellValueType.String: cellValueType = Asc.ECellTypeType.celltypeStr; break; case CellValueType.Bool: cellValueType = Asc.ECellTypeType.celltypeBool; break; + case CellValueType.Number: + let cellFormat = cell.getNumFormat(); + let isDateTimeFormat = cellFormat && cellFormat.isDateTimeFormat() && cellFormat.getType() !== Asc.c_oAscNumFormatType.Time; + if (isDateTimeFormat) { + cellValueType = Asc.ECellTypeType.celltypeDate; + } else { + cellValueType = Asc.ECellTypeType.celltypeNumber; + } + break; case CellValueType.Error: cellValueType = Asc.ECellTypeType.celltypeError; break; From 5101cd1ba502a8d88bb4a6f402ca94f3175a2cf3 Mon Sep 17 00:00:00 2001 From: GoshaZotov Date: Mon, 6 Oct 2025 14:56:48 +0300 Subject: [PATCH 2/3] [se] Fix --- cell/model/WorkbookElems.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cell/model/WorkbookElems.js b/cell/model/WorkbookElems.js index fefcbb78b7..a01ab98a7c 100644 --- a/cell/model/WorkbookElems.js +++ b/cell/model/WorkbookElems.js @@ -16373,10 +16373,7 @@ function RangeDataManagerElem(bbox, data) } let cellType = cell.getType(); - let newVal = noData ? "#REF!" : cell.getValue(); - if (cellType === CellValueType.Number) { - newVal = cell.getNumberValue(); - } + let newVal = noData ? "#REF!" : (cellType === CellValueType.Number ? cell.getNumberValue() : cell.getValue()); if (this.CellValue !== newVal) { isChanged = true; this.CellValue = newVal; From 02088ebc7d45e74f3474c0fe86f8a56904a81fda Mon Sep 17 00:00:00 2001 From: GoshaZotov Date: Tue, 7 Oct 2025 12:57:57 +0300 Subject: [PATCH 3/3] [se] Fix bug 75974 --- cell/model/WorkbookElems.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cell/model/WorkbookElems.js b/cell/model/WorkbookElems.js index a01ab98a7c..bf6bdfedbb 100644 --- a/cell/model/WorkbookElems.js +++ b/cell/model/WorkbookElems.js @@ -16373,7 +16373,17 @@ function RangeDataManagerElem(bbox, data) } let cellType = cell.getType(); - let newVal = noData ? "#REF!" : (cellType === CellValueType.Number ? cell.getNumberValue() : cell.getValue()); + let newVal; + if (noData) { + newVal = "#REF!"; + } else { + if (cellType === CellValueType.Number) { + let _numVal = cell.getNumberValue(); + newVal = _numVal == null ? cell.getValue() : _numVal + ""; + } else { + newVal = cell.getValue(); + } + } if (this.CellValue !== newVal) { isChanged = true; this.CellValue = newVal;