Andru
2023-11-03 a538020ae3d1af171816187a16ebb0072ea68892
src/main/java/com/hx/util/ExcelUtil.java
@@ -3,6 +3,7 @@
import com.hx.exception.TipsException;
import com.monitorjbl.xlsx.StreamingReader;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.openxml4j.exceptions.OLE2NotOfficeXmlFileException;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFCell;
@@ -884,7 +885,10 @@
               .bufferSize(10240)
               .open(new FileInputStream(file));
         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());
      }
@@ -912,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());
      }
@@ -937,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());