0

Can someone help me to update the below code since getCellTypeEnum() shows error:

The method getCellTypeEnum() is undefined for the type XSSFCell

Any help will be appreciated.

private void prepareInnerList(List<String> innerList, XSSFRow xssfRow, int j) {
    switch (xssfRow.getCell(j).getCellTypeEnum()) // Error is thrown at this line
    {

    case BLANK:
        innerList.add("");
        break;

    case STRING:
        innerList.add(xssfRow.getCell(j).getStringCellValue());
        break;

    case NUMERIC:
        innerList.add(xssfRow.getCell(j).getNumericCellValue() + "");
        break;

        case BOOLEAN:
        innerList.add(xssfRow.getCell(j).getBooleanCellValue() + "");
        break;


}
zero323
  • 322,348
  • 103
  • 959
  • 935

1 Answers1

2

According to the documentation, getCellTypeEnum() is deprecated.

Use getCellType() instead.

Daniel Simpkins
  • 674
  • 5
  • 18