From 4ca89e156f849de0b991d98243c52e19db3c11bb Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Wed, 8 Jan 2025 11:56:11 +0000 Subject: [PATCH] [bug-69529] relax exception check git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922987 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java index effd61ccd2a..b5cc39728ba 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java @@ -394,7 +394,7 @@ private void outputCell() { // Try to use the value as a formattable number double d = Double.parseDouble(fv); thisStr = formatter.formatRawCellContents(d, this.formatIndex, this.formatString); - } catch (NumberFormatException e) { + } catch (Exception e) { // Formula is a String result not a Numeric one LOG.atInfo().log( "Error formatting cell '{}' - will use its raw value instead (format '{}')", @@ -434,7 +434,7 @@ private void outputCell() { try { thisStr = formatter.formatRawCellContents( Double.parseDouble(n), this.formatIndex, this.formatString); - } catch (NumberFormatException e) { + } catch (Exception e) { LOG.atInfo().log( "Error formatting cell '{}' - will use its raw value instead (format '{}')", cellRef,