https://issues.apache.org/bugzilla/show_bug.cgi?id=46433
Summary: XSSFWorkbook.getCellFormula() Failed
Product: POI
Version: 3.5-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
I use following codes to read the formula in attached Excel: formula.xlsx. I
found that except the first row, "c.getCellFormula()" return an empty string.
In fact, other rows do contain formula.
--
XSSFWorkbook wb = new XSSFWorkbook("formula.xlsx");
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
for(int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) {
Sheet sheet = wb.getSheetAt(sheetNum);
for(Row r : sheet) {
for(Cell c : r) {
if(c.getCellType() == Cell.CELL_TYPE_FORMULA) {
System.out.println("c.getCellFormula():" +
c.getCellFormula());
}
}
}
}
--
Please help. Thanks a lot!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]