Commit 8bb8537eba199017f54d9763ae163f600d117f99
1 parent
a82d0713
Exists in
master
temp
Showing
2 changed files
with
12 additions
and
2 deletions
Show diff stats
src/main/java/com/taover/util/UtilExcel.java
@@ -305,7 +305,7 @@ public class UtilExcel { | @@ -305,7 +305,7 @@ public class UtilExcel { | ||
305 | Sheet sheet = wb.getSheetAt(sheetIndex); | 305 | Sheet sheet = wb.getSheetAt(sheetIndex); |
306 | int end = sheet.getLastRowNum(); | 306 | int end = sheet.getLastRowNum(); |
307 | if(end > UtilExcel.maxExcelRowNum){ | 307 | if(end > UtilExcel.maxExcelRowNum){ |
308 | - throw new Exception("目前系统只支持读取10000行以内记录,您当前Excel行数过大"); | 308 | + //throw new Exception("目前系统只支持读取10000行以内记录,您当前Excel行数过大"); |
309 | } | 309 | } |
310 | return readExcelBySheet(sheet, UtilExcel.maxExcelRowNum, false); | 310 | return readExcelBySheet(sheet, UtilExcel.maxExcelRowNum, false); |
311 | } | 311 | } |
src/test/java/TempExcel.java
@@ -8,7 +8,17 @@ import com.taover.util.UtilExcel; | @@ -8,7 +8,17 @@ import com.taover.util.UtilExcel; | ||
8 | 8 | ||
9 | public class TempExcel { | 9 | public class TempExcel { |
10 | public static void main(String[] args){ | 10 | public static void main(String[] args){ |
11 | - dealExcel(); | 11 | + checkExcelError(); |
12 | + } | ||
13 | + | ||
14 | + public static void checkExcelError() { | ||
15 | + List<List<Object>> data = null; | ||
16 | + try { | ||
17 | + data = UtilExcel.readExcelAllSheet("C:\\Users\\Administrator\\Desktop\\异常Excel\\大文件测试2.xlsx"); | ||
18 | + } catch (Exception e) { | ||
19 | + e.printStackTrace(); | ||
20 | + } | ||
21 | + System.out.println("end"); | ||
12 | } | 22 | } |
13 | 23 | ||
14 | public static final String SEPARATE_CONSIGNEE_MOBILE = "__"; | 24 | public static final String SEPARATE_CONSIGNEE_MOBILE = "__"; |