Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(numfmt): if cell type specified number type, do not determine the type of v (#5402)
wpxp1234563552d2070433
diff --git a/packages/sheets-numfmt/src/controllers/numfmt-cell-content.controller.ts b/packages/sheets-numfmt/src/controllers/numfmt-cell-content.controller.tsindex 9f2055141a..6e5be19b57 100644--- a/packages/sheets-numfmt/src/controllers/numfmt-cell-content.controller.ts+++ b/packages/sheets-numfmt/src/controllers/numfmt-cell-content.controller.ts@@ -134,10 +134,13 @@ export class SheetsNumfmtCellContentController extends Disposable {return next(cell);}- const type = checkCellValueType(originCellValue.v);- // just handle number or number string- if (type !== CellValueType.NUMBER) {- return next(cell);+ // If the cell not specified number type, then check the cell value type+ if (originCellValue.t !== CellValueType.NUMBER) {+ const type = checkCellValueType(originCellValue.v);+ // just handle number or number string+ if (type !== CellValueType.NUMBER) {+ return next(cell);+ }}if (!cell || cell === location.rawData) {