From 31a4e6cb13d139c7d54038ecb204b4ae1b152c61 Mon Sep 17 00:00:00 2001 From: Evan Hallmark Date: Mon, 7 Nov 2016 11:19:12 -0800 Subject: Override NumFmt serialized_attributes to ovid removing underscores --- lib/axlsx/stylesheet/num_fmt.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/axlsx/stylesheet/num_fmt.rb b/lib/axlsx/stylesheet/num_fmt.rb index 8276ba18..1072d18a 100644 --- a/lib/axlsx/stylesheet/num_fmt.rb +++ b/lib/axlsx/stylesheet/num_fmt.rb @@ -73,5 +73,14 @@ module Axlsx serialized_tag('numFmt', str) end + # Override to avoid removing underscores + def serialized_attributes(str = '', additional_attributes = {}) + attributes = declared_attributes.merge! additional_attributes + attributes.each do |key, value| + str << "#{Axlsx.camel(key, false)}=\"#{Axlsx.booleanize(value)}\" " + end + str + end + end end -- cgit v1.2.3