Is it a bug for Formula Floor?

when i use Formula Function floor(98.10,0.1) the result is 98 ,but the correct is 98.1

and i also test some other values,here is the result

floor(98.20,0.1) result: 98.20

floor(50.10,0.1) result: 50.1

floor(80.10,0.1) result: 80 (wrong)

floor(80.1001,0.1) result: 80.10

please help me how to solve this problem? thanks.

the test code :

Workbook workbook = new Workbook();
var results = workbook.Worksheets[0].CalculateFormula("=floor(98.10,0.1)");
Console.WriteLine(results);

Hi Weiguo,

Thanks for your posting and using Aspose.Cells.

Yes it is a bug of Aspose.Cells. We have tested this issue with the latest version: Aspose.Cells for .NET 8.2.2 and found this issue. Floor formula is not calculated correctly by Aspose.Cells.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-43094 - Floor formula is not calculated correctly

We have tested this issue with the following sample code. I have also attached the source Excel file used in this code and the output PDF file generated by it as well as a screenshot showing the issue for a reference.

C#

string filePath = @“F:\Shak-Data-RW\Downloads\sample.xlsx”;


Workbook workbook = new Workbook(filePath);


workbook.CalculateFormula();


workbook.Save(filePath + “.out.pdf”, SaveFormat.Pdf);

Hi Weiguo,

Thanks for using Aspose.Cells.

We have fixed
this issue now. We will provide you a fix in couple of days after
incorporating other enhancements and fixes and conducting some extensive
testing. Once, it is available for you, we will let you know asap by
posting in this thread.

Hi Weiguo,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.2.2.1 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-43094) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.