Bug 35980 - HSSFRow.getCell() returns null for formatted empty cell
Summary: HSSFRow.getCell() returns null for formatted empty cell
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-02 20:14 UTC by Ken
Modified: 2006-09-11 04:18 UTC (History)
0 users



Attachments
Test case to demonstrate the problem (13.50 KB, application/octet-stream)
2005-10-19 17:27 UTC, Tim Kannenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken 2005-08-02 20:14:19 UTC
I have a workbook with preexisting formats, the cells are empty at this point. 
I use POI to open and write to the cells. The problem is HSSFRow.getCell() row 
returns an null HSSFCell value for the formatted empty cells.
Comment 1 Jason Height 2005-08-24 04:59:27 UTC
Ken,

Can you attach the template and indicate the cell that has the formatting that
you are trying to use. 

I just tried to do what you describe and it works for me.

Jason
Comment 2 Tim Kannenberg 2005-10-19 17:27:56 UTC
Created attachment 16755 [details]
Test case to demonstrate the problem

In the attached spreadsheet, cells F1 and F2 are both empty; the difference is
that F1 has a format of General, and F2 has a format of Special-ZIP Code. 
getCell() returns a cell of type HSSFCell.CELL_TYPE_BLANK for F1, but it
returns null for F2.
Comment 3 Jason Height 2006-09-11 11:18:34 UTC
Ok the issue here is that there is actually no cell at F2, but rather the column
is formatted as Special-Zip code. Think about this for a minute and it will make
sense.

I know that it looks a bit odd, but this actually isnt a bug.

I dont think that we want to start returning blank cells for those that havent
been initialised, this would be a major usermodel departure.

Jason