Bug 41027

Summary: [INFO NEEDED]Sorting numeric columns with blank values
Product: POI Reporter: Aidan Holmes <aidan.holmes>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: Other   
OS: Linux   

Description Aidan Holmes 2006-11-23 06:10:08 UTC
When numeric values are written to a column with some blanks cells in between,
sorting should leave blanks at the bottom regardless of whether sorting is
ascending or descending. However, often for presentation purposes a blank cell
with style is required. A blank cell cannot be created as type numeric as a 0
automatically appears in it. Also numeric fields appear as general type when you
go to format cell in excel but not in open office interestingly enough!!

Hope this covers the bug but if you need more information, let me know. 

Keep up the good work!...
Comment 1 Avik Sengupta 2007-01-16 07:55:26 UTC
Sorry, cannot understand this. Could you pls specify what you expect POI to
achieve functionally? Thanks
Comment 2 Josh Micich 2008-05-11 02:05:22 UTC
You should be able to set any blank cells explicitly:

cell.setCellType(HSSFCell.CELL_TYPE_BLANK);

Excel displays such cells empty even if number formatting is applied.

Excel seems to sort blank values to the bottom regardless of whether the direction is ascending or descending.  BTW - empty text cells (which look like blank cells) sort to the top when the direction is descending.