CELL_TYPE_STRING cannot be resolved or is not a field

后端 未结 3 476
梦谈多话
梦谈多话 2021-02-04 15:05

Stack trace

Exception in thread \"main\" java.lang.Error: Unresolved compilation problems: 
CELL_TYPE_STRING cannot be resolved or is not a field
CELL_TYPE_N         


        
3条回答
  •  野性不改
    2021-02-04 15:31

    The enums are STRING, NUMERIC and BOOLEAN, drop the CELL_TYPE_, and they are part of CellType enum

    switch(celldata.getCellType()) {
        case CellType.STRING:
            data.add(celldata.getStringCellValue());
            break;
        case CellType.NUMERIC:
            data.add(celldata.getNumericCellValue());
            break;
        case CellType.BOOLEAN:
            data.add(celldata.getBooleanCellValue());
            break;
    }
    

提交回复
热议问题