Hi,
Using Aspose Cells for Java, version 19.8.
The provided file input.xlsx
is loaded, recalculated and saved using the following code:
System.out.println(CellsHelper.getVersion());
Workbook workbook = new Workbook("input.xlsx");
workbook.calculateFormula();
workbook.save("output.xlsx");
Attempting to open the recalculated workbook with Microsoft Excel results in either a corruption error, or a straight crash of the Excel process.
Inspecting and comparing input.xlsx
and output.xlsx
files, some formulas containing structured references seem to have been broken by Aspose Cells. For example, checking table14.xml
in the xlsx content, the original content for column with id 8
(“Inflation - No shock”) was:
<tableColumn id="8" name="Inflation - No shock" dataCellStyle="SF_FORMULA"><calculatedColumnFormula>IF(SFInterface[[#This Row],[Calculation of Inflation rates performed]],SUMIFS(CalscKobe[Inflation - No shock],CalscKobe[Currency],SFInterface[[#This Row],[Currency]],CalscKobe[Year],SFInterface[[#This Row],[Maturity of cashflow element - in years]]),SUMIFS(liability_cf_kobe[Inflation precalculated],liability_cf_kobe[Cashflow element ID],SFInterface[[#This Row],[Cashflow element ID]]))</calculatedColumnFormula></tableColumn>```
After the recalculation with Aspose Cells, the formula becomes:
<tableColumn id="8" name="Inflation - No shock"><calculatedColumnFormula>IF(SFInterface[[#This Row],[Calculation of Inflation rates performed]],SUMIFS(CalscKobe[Inflation - No shock],CalscKobe[Currency],SFInterface[[#This Row],[Currency]],CalscKobe[Year],SFInterface[[#This Row],[Maturity of cashflow element - in years]]),SUMIFS([Inflation precalculated],[Cashflow element ID],SFInterface[[#This Row],[Cashflow element ID]]))</calculatedColumnFormula></tableColumn>
Note that Aspose Cells has removed the qualifying references to table liability_cf_kobe
. As a result the formula now contains column references that can not be resolved in the current table.
From trying older builds, it seems that this regression has been introduced in Aspose Cells for Java, release 18.5.
Kind regards,
Taras
case.zip (313.9 KB)