Attached is an XLS file that I created in Numbers (yes, I know it's a
bit odd :-). It's a pretty simple document with only four rows and three
columns, where in the last row each cell is a fomula of some kind.
Both Numbers _and_ Excel read and render the formula cells properly, but
using POI (usermodel) the cells are seen as null for some reason. e.g.
Workbook excel = new HSSFWorkbook(new FileInputStream(resource));
Sheet sheet = excel.getSheetAt(sheetNum);
sheet.getRow(3).getCell(0) // This is null, but shouldn't be.
I thought this might be a problem with the usermodel API and that
perhaps the event API would work properly, so I decided to try running
the XLS2CSVmra example on the document to see if it could see the
formula cells:
[email protected]:~/Desktop/poi/build/examples-classes [:-)]% java -cp
../classes:. org.apache.poi.hssf.eventusermodel.examples.XLS2CSVmra
formulas.xls
Sheet 1 - Table 1 - Table 1 - T [1]:
"Sum of Numbers","Max of Numbers","Dates?",,,,,
1,1,Dec 31, 2004,,,,,
2,2,Jan 1, 2005,,,,,
,,,,,,,
... (and some more empty rows that don't really matter)
I'm not familiar enough with POI to know whether I'm doing something
wrong or if this is an actual bug. Does anyone have any insight?
Sam Gibson
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]