Applying custom format rendering for single quote using Aspose.Cells in .NET

Hi,

Thanks for your reply. Please see the screenshot. Here I generated an excel file using two custom formats -

1. [$-1010409]"$"#'##0;("$"#'##0)

2. [$-1010409]"$"#,##0;("$"#,##0)

These two formats are not giving same output. However my initial problem was something different.

Problem description -

When I am trying to add custom format [$-1010409]"$"#'##0;("$"#'##0) through Aspose.Cells, after rendering excel, the format is converting to [$-1010409]"$"#\'##0;("$"#\'##0). You will notice a front slash just before the single quote.

My question is why this extra front slash is rendering?

Thanks,

Dipankar

Hi,

As we have said, Style.Custom uses standard separators ‘,’ as group separator. When assign custom formatting to Style.Custom, user should use ‘,’ to represent the group separator. When you input the custom format as “#’##0”, the character “’” will be taken as its literal value, not a group separator. For excel’s custom string, this character should be escaped to represent itself, so ‘’ will be insert it before it in the custom string.If you use ‘,’ as the group separator, just like the code in our previous post, you will get the cell formatted with localized group separator “’” as you expected in ms excel in your default locale. If you cannot generate the excel file as you expected with aspose.cells, please provided you code and we will check it soon.

Thank you.