Excel 2007 Recalculation Problem

We are having an issue with Excel 2007 not recalculating values in a sheet when saved with Aspose.Cells v5.2.0 or greater.


Pressing the ‘calculate now’ button in Excel 2007 does not cause the cell content to be recalculated, only changing the value of the cell does.

This problem does not occur in Excel 2010. The problem does not occur in Excel 2007 if using Aspose.Cells v5.1.4 or lower.

Calling CalculateFormula on the Workbook partially solves the problem, though this solution is not suitable for us as CalculateFormula fails to correctly calculate the result of some formula in our sheet.

To demonstrate the problem I have created a sheet with the word ‘Test’ in cell A1. Cell A2 contains the formula ‘=A1’.

We then use the following code to update cell A1:

Workbook wb = new Workbook(“Test.xlsx”);
wb.Worksheets[0].Cells[0, 0].PutValue(“Changed”);
wb.Save(“Test Out.xlsx”);

When ‘Test Out.xlsx’ saved using v5.1.4 or lower we see the word ‘Changed’ in both cells A1 and A2 when opened using Excel 2007 or Excel 2010.

When it is saved using v.5.2.0 or newer in Excel 2007 we see ‘Changed’ in cell A1 and ‘Test’ in cell A2. Excel 2010 shows ‘Changed’ in both cells.

Could someone please investigate this for me? We need to move to a newer version to fix another bug we have encountered but cannot do so until this issue is fixed.

Hi,

I could not find the issue using the attached version (latest version v5.3.3.3). Here is my sample code and attached is the input + output files.
Sample code:

Workbook wb = new Workbook(“e:\test2\ExcelRecalc\Test.xlsx”);
wb.Worksheets[0].Cells[0, 0].PutValue(“Changed”);
wb.Save(“e:\test2\ExcelRecalc\Test Out.xlsx”);


I am using Excel 2007 to see the output file which is fine to me.

Thank you.

Thanks, the updated version has fixed the problem.


Could you provide the .NET 3.5 version of the v5.3.3.3 DLL?

Hi,

Please check the topic:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/using-aspose-cells-component-on-32bit-and-64bit-platforms.html

The version, I have provided is compiled on .NET 2.0, so it works fine on .NET framework versions i.e. 2.x, 3.x, 4.x etc.

But, if you are using .NET 3.5/4.0 Framework Client Profile, then this version will not work on it and you may ask us to provide the supported version. We will be happy to provide your desired version.

Kindly let us know if you still have any confusion or want .NET 3.5/4.0 Framework client profile, we will be happy to assist you.

Thank you.

I am using Aspose Cells 7.3.1 .Net 3.5 Client Profile and I am experiencing the formula not updating issue. I switched to 7.3.1 .Net 2.0 and it works fine.

What are the differences of these 2 dlls? I dont understand why 7.3.1 behaves differently depending on the framework. I would expect the 3.5/4.0 should be the most stable and up to date.

Hi,


The Client Profile version is mainly used on console application for .NET 3.5/4.x client profile framework. Some Graphical and Web APIs or component’s overloaded methods (e.g Workbook.Save() overloads that involves Response object) are not supported on .NET client profile version. The .NET 2.0 compiled version of Aspose.Cells is targeted for any CPU (i.e…, .NET Framework 2.x, 3.x, 4.x etc.), this will work fine on any project type. i.e…, WinForm, WebForms, Console Application, Win/Web Services etc.

Anyways, could you create a sample console application with .NET Client profile version of v7.3.1, zip it and post it here to show the issue, we will check your issue soon.

Thank you.