Bug 25769

Summary: HSSFRow.getCell() returns null for cell with formula.
Product: POI Reporter: Matthew Ho <matthew.ho>
Component: HSSFAssignee: POI Developers List <dev>
Severity: blocker CC: matthew.ho
Priority: P3    
Version: 1.5.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: excel 2000

Description Matthew Ho 2003-12-27 04:33:38 UTC
I have an existing spreadsheet that I use the HSSF APIs to programmatically 
retrieve values.  For the cell that has formula like "='Trip Report Form'!$C$8".
The value returned is null.  (In fact, cell that has any formula always returns 

This is a show-stopper for me.  I have customer deliverable approaching.
I wonder if POI contributors can response to this one quickly.
Is there at least a workaround?  Please help!  Thanks a lot!
Comment 1 Matthew Ho 2003-12-27 04:46:44 UTC
Created attachment 9708 [details]
excel 2000
Comment 2 Matthew Ho 2003-12-27 04:52:24 UTC
I have uploaded an Excel 2000 attachment as test data.
I'm only working with the "InputData" sheet.

FileInputStream fileIn = new FileInputStream((File) mapfrom);
// create a new org.apache.poi.poifs.filesystem.Filesystem
POIFSFileSystem fs = new POIFSFileSystem(fileIn);

HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheet("InputData");

Iterator rowIterator = sheet.rowIterator();
while (rowIterator.hasNext()) {
	HSSFRow row = (HSSFRow) rowIterator.next();
	HSSFCell cell = row.getCell(0);
	if (cell == null) {
            System.out.println("---> Cell null ");
Comment 3 Avik Sengupta 2004-01-01 09:11:14 UTC
You seem to be using version 1.5.1 which does NOT have ANY formula support.
Please upgrade to the latest version (2.0 RC1). I have run your file on that
version, and thing work perfectly. 
Comment 4 Monica 2005-03-04 04:43:21 UTC

I am using POI to read an excel sheet.It has some formula values.when I tried 
to do HSSFRow.getCell() returns null.I think I am using latest version only.

Can you please send me link where I can get latest version 

Comment 5 Avik Sengupta 2005-05-20 11:58:03 UTC
This is not a bug in Excel for the last two years. Please do not reopen.