We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Calculated Zero is displayed as Minus Zero


“-0” is actually calculated as
“-0.30” in excel, as it’s decimal places setting is Zero, it is showing “0” in

If I perform getValue()
operation on this cell I get “-0.3” and if I perform getStringValue() operation
on this cell I get “-0”.

But on the screen I want to display “0” instead of “-0”.

Please let me know what can be
done. I have attached a sample simulation application.<o:p></o:p>

Thanks & Regards,

Hi Kailas,

Thank you for the template file and simulation application, please try this attached fix.

Hi Johnson,

The above issue is not completely fixed. I have attached a couple of test cases along with reference template. Please read my comments in the attached Java code for information on the test case.

Can you please fix this?


Note: Looking at the current behavior, I guess you are using the java DecimalFormatter to format the values which does not behave like Excel does.

Hi Shashi,

Thank you for the application, yes, it is a bug of JDK's DecimalFormat, please try this attached version.

Hi Johnson,

Thanks for the fix. We tested it and its working fine. Needless to say, you guys are fantastic when it comes to support.

Thanks again!