Commit 2eef6859f45a2a3cd20ce94fb4a97279d2910197

Authored by wangbin
1 parent 14ff9709
Exists in master

1.Excel读取允许最大行变更,不抛出异常

Showing 1 changed file with 0 additions and 4 deletions   Show diff stats
src/main/java/com/taover/util/UtilExcel.java
@@ -391,11 +391,7 @@ public class UtilExcel { @@ -391,11 +391,7 @@ public class UtilExcel {
391 391
392 private static List<List<Object>> readExcelBySheetIndex(Workbook wb, int sheetIndex, boolean hasRowLimit) throws Exception{ 392 private static List<List<Object>> readExcelBySheetIndex(Workbook wb, int sheetIndex, boolean hasRowLimit) throws Exception{
393 Sheet sheet = wb.getSheetAt(sheetIndex); 393 Sheet sheet = wb.getSheetAt(sheetIndex);
394 - int end = sheet.getLastRowNum();  
395 if(hasRowLimit){ 394 if(hasRowLimit){
396 - if(end > UtilExcel.maxExcelRowNum) {  
397 - throw new Exception("目前系统只支持读取"+UtilExcel.maxExcelRowNum+"行以内记录,您当前Excel行数过大");  
398 - }  
399 return readExcelBySheet(sheet, UtilExcel.maxExcelRowNum, false); 395 return readExcelBySheet(sheet, UtilExcel.maxExcelRowNum, false);
400 }else { 396 }else {
401 return readExcelBySheet(sheet, Integer.MAX_VALUE, false); 397 return readExcelBySheet(sheet, Integer.MAX_VALUE, false);