Hello,
Hi Philip,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue after executing the following code and converting your source Excel file into PDF using the latest version: Aspose.Cells
for .NET v8.2.1.4. Some of the 0 values are shown negative in red color.
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-43079.
I have also attached the output PDF and screenshot highlighting this issue for a reference.
C#
String filePath = @“F:\Shak-Data-RW\Downloads\profile_test.xls”;
Workbook workbook = new Workbook(filePath);
workbook.CalculateFormula();
workbook.Save(filePath + “.out.pdf”);
Hi,
Thanks for using Aspose.Cells.
We have looked into this issue further and found that this issue is caused by precision of C#.
Please try the following code:
double a = -0.45;//F36
double b = 0.43;//F39
double c = a + b;//
double d = 0.02;//F40
double e = c + d;//F41
The value of c is -0.020000000000000018, not -0.02. So the result of F41 is not zero.
We will look into it and see how to work as MS Excel.
Thank you for the update so far.
Hi Philip,
Thanks for your posting and using Aspose.Cells.
Sure, we will keep you updated with any other news or a fix when it is available for your testing.