Bug 60228

Summary: Cell.getCellTypeEnum should not be deprecated until Cell.getCellType returns a CellType
Product: POI Reporter: atsfour <timitikati>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.15-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 59836    

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
r1763960
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