| | |
| | | Date d; |
| | | DateFormat formater; |
| | | Sheet sheet; |
| | | Cell cell; |
| | | //遍历所有的sheet |
| | | for(int i=0;i<book.getNumberOfSheets();i++) { |
| | | sheet = book.getSheetAt(i); |
| | | //列数 |
| | | Integer arrange = null; |
| | | //遍历所有的行 |
| | | for (Row row : sheet) { |
| | | if(row == null){ |
| | | continue; |
| | | } |
| | | isData = false; |
| | | arrayString = new ArrayList<>(); |
| | | if(arrange == null){ |
| | | arrange = row.getPhysicalNumberOfCells(); |
| | | } |
| | | //遍历所有的列 |
| | | for (Cell cell : row) { |
| | | for (int j = 0;j<arrange;j++) { |
| | | cell = row.getCell(j); |
| | | if (cell == null) { |
| | | arrayString.add(""); |
| | | } else if (cell.getCellType() == CellType.NUMERIC) { |