Hi, I need to format numbers into comma separated numbers. I’m using this custom format: “#,###;-#,###;0”. This format works fine for numbers greater than or equal to 0.5. But for numbers less than 0.5, they all disappear and leave blank cells. I have double checked my Excel options to show zeros.
I’m just wondering if there is any API I can call so the zeros would show. Thanks a lot.
This is MS Excel’s behavior and nothing to do with Aspose.Cells APIs by any means. In MS Excel worksheet, you may confirm this behavior by applying the format “#,###;-#,###;0” to a cell and then enter some value to it. You will also notice this behavior. For this format, MS Excel will show blank for values lessor than 0.5. I guess you should choose and specify appropriate formatting string for your custom needs. For example, you may try “#,###0.0;-#,###0.0;0” or any better formatting for your task.
I think you may try to write some conditional formatting string. For example, could you try using “[<0.5]#,##0;-#,###;#,###” if it works for your needs.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.