From a55b4fdd64494571f785302674553073c5563dbf Mon Sep 17 00:00:00 2001 From: canonical Date: Wed, 25 Dec 2024 21:44:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/nop/ooxml/xlsx/parse/SheetNodeHandler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nop-ooxml/nop-ooxml-xlsx/src/main/java/io/nop/ooxml/xlsx/parse/SheetNodeHandler.java b/nop-ooxml/nop-ooxml-xlsx/src/main/java/io/nop/ooxml/xlsx/parse/SheetNodeHandler.java index 360f115d3..753a08d6c 100644 --- a/nop-ooxml/nop-ooxml-xlsx/src/main/java/io/nop/ooxml/xlsx/parse/SheetNodeHandler.java +++ b/nop-ooxml/nop-ooxml-xlsx/src/main/java/io/nop/ooxml/xlsx/parse/SheetNodeHandler.java @@ -339,9 +339,11 @@ public void endNode(String localName) { } else if ("dataValidation".equals(localName)) { output.dataValidation(dataValidation); } else if ("formula".equals(localName)) { - vfOpen = false; - dataValidation.setFormula(validationFormula.toString()); - validationFormula.setLength(0); + if(dataValidation != null) { + vfOpen = false; + dataValidation.setFormula(validationFormula.toString()); + validationFormula.setLength(0); + } } }