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 null). 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!
Created attachment 9708 [details] excel 2000
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 "); } }
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.
Hi, 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 Thanks Monica
This is not a bug in Excel for the last two years. Please do not reopen.