Home > Software engineering >  Excel formatting codes
Excel formatting codes

Time:11-06

I am reading the ECMA-376 specification and I am testing my understanding of the matter using Excel for real. I am basically in need of implementing a few of these codes in a GoLang script.

What's the meaning of this format code #,##0 and why couldn't it be simply written as #,##.

In other words what's the meaning of the trailing zero ?

CodePudding user response:

  1. #,## would return a number 1234 like 12,34
  2. you could do #,### which would do 1,234
  3. The 0 is so 0 always shows. Usually this is in junction with a decimal: #,##0.00 so it would show 0.50 when the user enters .5. If decimals are not used there really is no difference between #,### and #,##0
  • Related