From 9020811b517b3a417231e0558d740804ca6fb5b2 Mon Sep 17 00:00:00 2001 From: fwq <582742538@qq.com> Date: 星期一, 23 十月 2023 19:55:00 +0800 Subject: [PATCH] 解析Excel问题 --- src/main/java/com/hx/util/ExcelUtil.java | 5 ++++- 1 files changed, 4 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..cb92bab 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()); } -- Gitblit v1.8.0