-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
6.0.1.Final, 6.1.0.CR2
-
None
-
None
To reproduce:
- in a decision table merge 2 cells with each other
- in the merged cell create a reference to another cell e.g. "=D21"
Result:
The value of the merged cell is parsed as "D21"
Expected result:
The value of the merged cell should be the same as the referenced one
The bug is in ExcelParser.processSheet. A quick fix is replacing
Cell topLeft = sheet.getRow( merged.getFirstRow() ).getCell( merged.getFirstColumn() ); newCell( listeners, i, cellNum, formatter.formatCellValue( topLeft ), topLeft.getColumnIndex() );
with
if(topLeft.getCellType() == Cell.CELL_TYPE_FORMULA) { newCell( listeners, i, cellNum, formatter.formatCellValue( topLeft, formulaEvaluator ), topLeft.getColumnIndex() ); } else { newCell( listeners, i, cellNum, formatter.formatCellValue( topLeft ), topLeft.getColumnIndex() ); }
There are probably some more cases missing as numeric referenced values seem to still not be parsed properly.