上传者: 39402292
|
上传时间: 2021-12-27 15:42:30
|
文件大小: 14KB
|
文件类型: -
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();
}