Summary: | HSSFRow.getCell() returns null for cell with formula. | ||
---|---|---|---|
Product: | POI | Reporter: | Matthew Ho <matthew.ho> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED INVALID | ||
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
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. |