Bug 60228 - Cell.getCellTypeEnum should not be deprecated until Cell.getCellType returns a CellType
Summary: Cell.getCellTypeEnum should not be deprecated until Cell.getCellType returns ...
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.15-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Blocks: 59836
  Show dependency tree
Reported: 2016-10-09 08:43 UTC by atsfour
Modified: 2016-11-08 16:31 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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 1 Javen O'Neal 2016-10-09 11:00:12 UTC
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