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.