Skip to content

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.

fix(formula): when empty with value is "" (#6569)

Univer7e59f3e1fc25
diff --git a/packages/engine-formula/src/models/formula-data.model.ts b/packages/engine-formula/src/models/formula-data.model.ts
index b401f4a6f1..a205f42885 100644
--- a/packages/engine-formula/src/models/formula-data.model.ts
+++ b/packages/engine-formula/src/models/formula-data.model.ts
@@ -599,7 +599,7 @@ export class FormulaDataModel extends Disposable {
// Calculation is only required when there is only a formula and no value
const isFormula = isFormulaString(currentCell?.f) || isFormulaId(currentCell?.si);
- const noValue = currentCell?.v === undefined;
+ const noValue = currentCell?.v === undefined || currentCell?.v === null || currentCell?.v === '';
if (!(isFormula && noValue)) continue;