Closed GoogleCodeExporter closed 8 years ago
//Override with fix error
@Override
protected void finalSheetFormat()
{
final FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
if (isHierarchical())
{
for (final Row r : sheet)
{
for (final Cell c : r)
{
if (c.getCellType() == Cell.CELL_TYPE_FORMULA)
{
evaluator.evaluateInCell(c);
}
}
}
workbook.setActiveSheet(workbook.getSheetIndex(sheet));
int index = workbook.getSheetIndex(hierarchicalTotalsSheet); //fix error
if (index > -1) workbook.removeSheetAt(index);
}
else
{
evaluator.evaluateAll();
}
for (int col = 0; col < getPropIds().size(); col++)
{
sheet.autoSizeColumn(col);
}
}
Original comment by the.one....@gmail.com
on 6 Feb 2012 at 5:25
I am incorporating a change suggested on the Vaadin discussion area for this
project (https://vaadin.com/forum/-/message_boards/view_message/1236773).
Where the.one.nexus has these two lines:
int index = workbook.getSheetIndex(hierarchicalTotalsSheet); //fix error
if (index > -1) workbook.removeSheetAt(index);
I have instead:
if (hierarchicalTotalsSheet != null) {
workbook.removeSheetAt(workbook.getSheetIndex(hierarchicalTotalsSheet));
}
This should fix the same bug you're talking about. let me know if it does not.
Original comment by jnas...@gmail.com
on 17 Mar 2012 at 11:56
fixed
Original comment by jnas...@gmail.com
on 18 Mar 2012 at 12:06
Original issue reported on code.google.com by
alexey.b...@gmail.com
on 3 Feb 2012 at 11:53