From d9fe4b6ff40a964c895a452ea12a04a13a979ec4 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期一, 04 十二月 2023 18:26:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/com/hx/util/ExcelUtil.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/hx/util/ExcelUtil.java b/src/main/java/com/hx/util/ExcelUtil.java
index ce1713f..da09b9b 100644
--- a/src/main/java/com/hx/util/ExcelUtil.java
+++ b/src/main/java/com/hx/util/ExcelUtil.java
@@ -916,7 +916,10 @@
 					.open(new BufferedInputStream(file.getInputStream()));
 
 			listData =readhandle(book);
-		}catch (Exception e){
+		}catch (OLE2NotOfficeXmlFileException ex){
+			ex.printStackTrace();
+			throw new RuntimeException("excel鐗堟湰涓嶄负2007鍙婁互涓�");
+		} catch (Exception e){
 			e.printStackTrace();
 			throw new RuntimeException(e.getMessage());
 		}
@@ -941,6 +944,9 @@
 					.open(file);
 
 			listData =readhandle(book);
+		}catch (OLE2NotOfficeXmlFileException ex){
+			ex.printStackTrace();
+			throw new RuntimeException("excel鐗堟湰涓嶄负2007鍙婁互涓�");
 		}catch (Exception e){
 			e.printStackTrace();
 			throw new RuntimeException(e.getMessage());

--
Gitblit v1.8.0