HI, I am using the evaluation version of Aspose.Cells for java.
I am an employee of Credit Agricole Corporate and Investisment Bank.
Whille testing, i found a bug about the excel function ROUNDUP.
In an excel sheet try to put the formula ROUNDUP(0.009357; 7)
excel gives the result 0.009357. The same formula with Aspose.Celles for java gives 0,0093571.
Can you please tell me when you can correct this bug ?
Thank you.
But But I guess the issue might be more related to JAVA (JDK SDK) rather than with Aspose.Cells API. Anyways, I have logged a ticket with an id “CELLSJAVA-43232” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
Hi actually it is not exactly a java issue.
Here is the exact representation as double of 0.009357:
0.0093570000000000007.
Hence, as we round up, because of the 7 it will give +1 to the last digit. It means that ROUNDUP(0.009357, x) for any x should give the wrong result.
I suppose it is the same for ROUNDDOWN for number like 0.009352 which representation is 0.0093519999999999992, for x greater than 7 will give numbers like 0.009351999
To solve this, you should use temporary BigDecimal
and apply first to the double a round with MathContext context = new MathContext(15, RoundingMode.HALF_UP);
Then use the BigDecimla.rount(MathContext) with the correct MathContext
finally use the BigDecimal.doubleValue() to get the new Double
Since we have logged a ticket for your issue, so kindly spare us little to time to investigate and evaluate your issue thoroughly. We will surely figure it out.
Once we have any new information, we will share it with you.
@namaman,
For performance consideration, we are afraid BigDecimal is not the preferred solution. We prefer to solving the issue with double value check and calculation. Hopefully the Attached fix can solve all such kind of issues.
HI, I made a mistake in my email account while creating the account the first time and I forgot the password too.
Then I create another account with the the good email.
But I cannot download this zip file, since the owner is the other account.
How can I get this file ?
The issues you have found earlier (filed as CELLSJAVA-43232) have been fixed in Aspose.Cells for Java 20.7. This message was posted using Bugs notification tool by Amjad_Sahi