Custom Format is removing negative sign for a value field

My custom format [<10]0.00;[>999]#,##0;0.0 is removing -ve sign for numbers less than 0. any way to retain -ve sign for negative numbers ?

@rahulvaitla

To retain the negative sign for numbers less than zero while using your custom format [<10]0.00;[>999]#,##0;0.0, you will need to modify your custom format to explicitly handle negative values.

In custom number formats, the general structure is as follows:

[condition1] format1; [condition2] format2; [condition3] format3

In your case, you can add a specific format for negative numbers. Here’s an example of how you can adjust your format:

[<10]0.00;[>999]#,##0;[<0]0.00;0.0

In this modified format:

  • The first part [<10]0.00 handles numbers less than 10.
  • The second part [>999]#,##0 handles numbers greater than 999.
  • The third part [<0]0.00 specifically formats negative numbers, ensuring that they retain their negative sign.
  • The last part 0.0 is for all other numbers.

This way, negative numbers will be displayed correctly with their sign, while still applying your desired formatting for other ranges.

If you need further assistance or examples, feel free to ask!

thank you for the reply.
but this formatting is also used by the MS Excel API, and it works well with MS Excel API.
If I add another condition in the custom format, the Excel API stops working.
So I need to handle it in the C# code using Aspose.
Could you kindly help>

@rahulvaitla
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56774

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

@rahulvaitla,

This is to inform you that your issue (Ticket ID: “CELLSNET-56774”) has been resolved now. The fix/enhancement will be included in our upcoming release (Aspose.Cells v24.10) that we plan to release in the first half of October 2024. You will be notified when the next version is released.

1 Like

The issues you have found earlier (filed as CELLSNET-56774) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi