diff options
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index d3a7cbf5..0cd9458d 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -336,9 +336,8 @@ module Axlsx if options[:format_code] || options[:type] == :dxf #If this is a standard xf we pull from numFmts the highest current and increment for num_fmt options[:num_fmt] ||= (@numFmts.map{ |num_fmt| num_fmt.numFmtId }.max + 1) if options[:type] != :dxf - #BUG? should we be pulling the max from xdfs.numFmt when the type is :dxf? numFmt = NumFmt.new(:numFmtId => options[:num_fmt] || 0, :formatCode=> options[:format_code].to_s) - options[:type] == :dxf ? numFmt : numFmts << numFmt + options[:type] == :dxf ? numFmt : (numFmts << numFmt; numFmt.numFmtId) else options[:num_fmt] end |
