davidtse
davidtse

Reputation: 41

Format negative number with parenthesis and spaces

I looking for a number format pattern to display negative number as (100,00), (1 000,05), (1 252 000,05) but with pattern like "#\ ###\ ###\ ##0_);(#\ ###\ ###\ ##0);" - ");@)" i get extra spaces after the first parenthese when the negative number is greater than -1 000 000 000.

sample of extra spaces on negative number:

(   50,05), (  1 000,05), ( 1 000 000,05), (1 000 000 000,05)

How can i manage this format?

I also tried the format "# ##0.00;(# ##0.00);" - ");@)" but work only for thousands number.

I use EPPLUS to generate excel file. I fill a string parameter with the number format when creating a cell.

Upvotes: 2

Views: 935

Answers (1)

davidtse
davidtse

Reputation: 41

I found the solution, EPPLUS add backslash before space to given format pattern. The workaround was to use a new pattern "#,##0.00;(#,##0.00);" - ");@)".

Upvotes: 2

Related Questions