Method: Axlsx::Styles#numFmts

Defined in:
lib/axlsx/stylesheet/styles.rb

#numFmtsSimpleTypedList (readonly)

Note:

The recommended way to manage styles is with add_style

numFmts for your styles.

The default styles, which change based on the system local, are as follows.
id formatCode
 0 General
 1 0
 2 0.00
 3 #,##0
 4 #,##0.00
 9 0%
 10 0.00%
 11 0.00E+00
 12 #   ?/?
 13 #   ??/??
 14 mm-dd-yy
 15 d-mmm-yy
 16 d-mmm
 17 mmm-yy
 18 h:mm AM/PM
 19 h:mm:ss AM/PM
 20 h:mm
 21 h:mm:ss
 22 m/d/yy h:mm
 37 #,##0 ;(#,##0)
 38 #,##0 ;[Red](#,##0)
 39 #,##0.00;(#,##0.00)
 40 #,##0.00;[Red](#,##0.00)
 45 mm:ss
 46 [h]:mm:ss
 47 mmss.0
 48 ##0.0E+0
 49 @
Axlsx also defines the following constants which you can use in add_style.
   NUM_FMT_PERCENT formats to "0%"
   NUM_FMT_YYYYMMDD formats to "yyyy/mm/dd"
   NUM_FMT_YYYYMMDDHHMMSS  formats to "yyyy/mm/dd hh:mm:ss"

Returns:

  • (SimpleTypedList)

See Also:

  • Open XML Part 1 - 18.8.31 for more information on creating number formats
  • #add_style


67
68
69
# File 'lib/axlsx/stylesheet/styles.rb', line 67

def numFmts
  @numFmts
end