Example usage for org.apache.poi.ss.usermodel CellType _NONE

List of usage examples for org.apache.poi.ss.usermodel CellType _NONE

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel CellType _NONE.

Prototype

CellType _NONE

To view the source code for org.apache.poi.ss.usermodel CellType _NONE.

Click Source Link

Document

Unknown type, used to represent a state prior to initialization or the lack of a concrete type.

Usage

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);
    }

}