Hi, we’ve encounterd an issue in the calculation of the attached excel using version 16.11.0 and 17.1.8.
Hi there,
book.CalculateFormula(new CalculationOptions() { PrecisionStrategy = CalculationPrecisionStrategy.Decimal});
var cells = book.Worksheets[“ConsolidationRiskGroups”].Cells;
Console.WriteLine(cells[“C4”].Value);
Hi, I advice you that with version 8.2.3.1 the error is not present. Can this help you?
Hi Silvano,
Hi, sorry I mistake to write. The version is 8.3.2.1
Hi again,
Hi, I think you are done some confusion.
Hi Silvano,
Hi, in locale we have Excel 2016 and Excel 2010.
Hi again,
Thank you for sharing the Excel versions. Could you please also share the Format set on your machine. It is accessible via Region dialog from system’s control panel? I have attached the snapshot from my machine for reference.
Hi, in image attached is my setup.
Hi again,
Please note, change of machine’s region/locale can only affect number formats (group & decimal separators), not the calculated results of any formula. In this case, I am not able to see the results as you have mentioned here so I am trying to mimic the exact circumstances, however, the results are still same on my end even though I have changed the format of my machine to Italian. I will check back with the product team in this regard, and share their findings as soon as possible. In the meanwhile, if you can, please share a screenshot of the sample spreadsheet loaded in Excel on your side after downloading the sample spreadsheet from this thread. This is just to confirm that we are operating on the same sample.
Thank you for your continues support in isolating the problem cause for this scenario.
Hi, I’ve download the excel attached in thist thread as you ask and post two screenshot. One in red with the error, and one in green with correct calc done by Excel.
Hi again,
Thank you for sharing the screenshots. Let me get in touch with the product team to know their findings about this incident. In case the product team requires any further information, I will let you know here. Please note, the ticket attached to this thread is currently pending for analysis and is in the queue with other priority tasks, however, I have already requested the concerned member of the product team to schedule the analysis at earliest possible, and share the preliminary analysis results for your reference.
Hi Silvano,
This is to update you that we have looked further into the matter logged earlier as CELLSNET-45144. Please note, the value 27,008,111.57 is stored in the spreadsheet. As soon as you recalculate the formulas (in Excel) the value changes to 25,805,084.58. Please note, you have to click on the “Calculate Now” button on Excel interface so that all formulas are calculated again. Same is the behavior of Aspose.Cells APIs, that is; if you fetch the value of the cell after calculating the formulas, it is 25,805,084.58 against the latest revision of the API. As the said value matches with Excel (after calculation) therefore the presented behavior is correct, and is not a bug on the part of Aspose.Cells APIs.
Could you please test the case against latest version of Aspose.Cells for .NET 17.2.0 and following code?
C#
var book = new Workbook(dir + “Rep+S.14.01+Life+Obligations+Analysis_FY16+Local_AVIV_Manual_error.xlsm”);
book.CalculateFormula();
var cells = book.Worksheets[“ConsolidationRiskGroups”].Cells;
Console.WriteLine(cells[“C4”].Value);
Hi again,
Adding more to my previous response, under some scenarios the regional settings can influence the formula calculation, such as: the formulas use formatting related functions such as TEXT or the formulas need to parse numeric value from string DateTime and so on. However, for this template file, we do not find such kind of functions.
Hi, I’ve tried the new version with not a deterministic result.
Hi again,
Hi again,