内存溢出xssfworkbook

时间:2022-05-18 10:47:47
【文件属性】:

文件名称:内存溢出xssfworkbook

文件大小:14KB

文件格式:JAVA

更新时间:2022-05-18 10:47:47

java

File test = new File("D:\\test.xlsx"); try { XSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(test)); SXSSFWorkbook workbook = new SXSSFWorkbook(wb); Sheet sheet = workbook.getSheetAt(0); for (int i = 0; i < 5; i++) { Row row = sheet.getRow(i); if(row==null){ System.out.println(i+":null"); } } } catch (Exception e) { e.printStackTrace(); }


网友评论