|Summary:||Cell.getCellTypeEnum should not be deprecated until Cell.getCellType returns a CellType|
|Component:||SS Common||Assignee:||POI Developers List <dev>|
|Bug Depends on:|
Description atsfour 2016-10-09 08:43:06 UTC
Both Cell.getCellTypeEnum and Cell.getCellType are deprecated at version 3.15. Then we cannot get some "cell type" value in non-deprecated way. Cell.getCellType should be deprecated because it will return a CellType value in the future. So using Cell.getCellTypeEnum is recommended at now. And after Cell.getCellType returns a CellType value, Cell.getCellTypeEnum should be deprecated.
Comment 2 sbchowrasia 2016-11-08 13:05:04 UTC
Hi Javen O'Neal Sorry to inform you that i am still getting deprecated warning message for usage of getCellTypeEnum() function. Below is the code which i am using. if (cell.getCellTypeEnum() == CellType.STRING) return cell.getStringCellValue(); Can you help me out. Please note: I have downloaded apache poi version 3.15 today itself.
Comment 3 Javen O'Neal 2016-11-08 16:31:13 UTC
The fix was applied after 3.15 was released. You will need to download a trunk build or wait for 3.16 beta 1 to be released. Also, it lools like you're trying to convert a cell value to a string. The best way to do this is with a DataFormatter class. See https://poi.apache.org/spreadsheet/quick-guide.html#Getting+the+cell+contents