Workbook.setRecalculateOnOpen(false) not working for newer Excel versions

Hi,

Using Aspose Cells for Java, version 19.8.6.

Sample code:

Workbook workbook = new Workbook("input.xlsx");
workbook.calculateFormula();
workbook.getSettings().setReCalculateOnOpen(false);
workbook.save("output.xlsx");

When opening the resulting workbook in Excel 2010, things work as expected. Aspose Cells has already calculated the workbook, and the setting setReCalculateOnOpen(false) prevents Excel 2010 from recalculating the workbook again (which takes a lot of time).

However, some of our users are using a newer version of Excel, and for those users, Excel will start to recalculate the workbook. Since this recalculation can take a long time, this is negatively impacting our product.

The Excel version that recalculates the workbook (despite us calling setReCalculateOnOpen(false)) is Excel 365. Specifically, the version reported by Excel itself is: Microsoft (r) Excel (r) for Office 365 MSO (16.0.11929.20288) 64-bit.

I have included in the attached zip archive a version of the workbook recalculated by Excel 365, named “output-365.xlsx”. Hopefully, you can identify the differences, and adjust Aspose Cells to generate workbooks that do not trigger a recalculation in newer Excel versions.

Kind regards,
Taras

aspose-cells-recalculate-in-365.zip (2.4 MB)

@TarasTielkes,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-43012 – Workbook.setRecalculateOnOpen(false) not working for newer Excel versions

@TarasTielkes,
This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-43012”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Just to clarify - will this fix be part of the upcoming 19.9 release?

@TarasTielkes,
Yes, this fix will be part of upcoming release 19.9.

The issues you have found earlier (filed as CELLSJAVA-43012) have been fixed in Aspose.Cells for Java v19.9. This message was posted using BugNotificationTool from Downloads module by ahsaniqbalsidiqui

@ahsaniqbalsidiqui,

Could you please try on your side if the workbook, regenerated with 19.9, indeed does not trigger a recalculation on open? Using the version of Excel 365 that we use, the workbooks recalculated and saved using the code above still trigger a recalculation on open, both when using Aspose Cells for Java version 19.9, as well as 19.11.3.

Thanks in advance,
Taras

@TarasTielkes,
We are working on this issue and we will share our feedback soon.

@TarasTielkes,
We have tested this scenario using the latest fix Aspose.Cells for Java v19.11.9 and opened the output file using Excel 365. It is observed that the output file opens instantly without any delay. Could you please give it a try and share the feedback? The output file generated with this version is attached here for your reference.

output_19.11.9.zip (702.3 KB)

We are facing the same issue with Aspose Cells for Java version 21.2
We have tried the same code with Aspose Cells for Dot.Net and it worked. Can you verify this is fixed in 21.2?

@odedha,
I have observed the scenario by saving Excel file using Aspose.Cells for Java 21.3 and .NET 21.3. These files are opened in MS Excel 365 however if we click somewhere out of MS Excel and then click again in MS Excel, the files are opened immediately. Could you please try this scenario at your end share the feedback?