From c71975025fd3bfe7812c07a34d0ec186f0dec73a Mon Sep 17 00:00:00 2001 From: Juan Lago Date: Wed, 28 Jun 2023 14:04:04 +0200 Subject: [PATCH] Automatically convert comma as point for numeric cells --- packages/core/src/modules/cell.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/modules/cell.ts b/packages/core/src/modules/cell.ts index d7d6293..d95647d 100644 --- a/packages/core/src/modules/cell.ts +++ b/packages/core/src/modules/cell.ts @@ -143,6 +143,10 @@ export function setCellValue( let vupdate; + if (!_.isNil(v.v) && _.includes(v.ct?.fa, "0.0")) { + v.v = _.replace(v.v.toString(), ",", "."); + } + if (_.isPlainObject(v)) { if (_.isNil(cell)) { cell = v; @@ -153,10 +157,6 @@ export function setCellValue( delete cell.f; } - // if (!_.isNil(v.spl)) { - // cell.spl = v.spl; - // } - if (!_.isNil(v.ct)) { cell.ct = v.ct; }