List of usage examples for org.apache.poi.ss.usermodel CellType _NONE
CellType _NONE
To view the source code for org.apache.poi.ss.usermodel CellType _NONE.
Click Source Link
From source file:org.tiefaces.components.websheet.configuration.ConfigurationHandler.java
License:MIT License
/** * check and repair the sheet's lastrow. If the row is blank then remove it. * * @param sheet/*from w w w .j ava2 s . c o m*/ * the sheet */ private final void checkAndRepairLastRow(final Sheet sheet) { // repair last row if it's inserted in the configuration generation Row lastrow = sheet.getRow(sheet.getLastRowNum()); // if it's lastrow and all the cells are blank. then remove the lastrow. if (lastrow != null) { for (Cell cell : lastrow) { if ((cell.getCellTypeEnum() != CellType._NONE) && (cell.getCellTypeEnum() != CellType.BLANK)) { return; } } sheet.removeRow(lastrow); } }