From 1f2795ac1c840d2bbb5435abd22e31abcf7fbc4e Mon Sep 17 00:00:00 2001 From: Chris Roby Date: Wed, 16 Jan 2013 15:50:00 -0800 Subject: sourceLinked should be false (0) when specifying a format_code for an axis --- lib/axlsx/drawing/axis.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/axlsx/drawing/axis.rb b/lib/axlsx/drawing/axis.rb index 7e677a2e..b2bb8fe7 100644 --- a/lib/axlsx/drawing/axis.rb +++ b/lib/axlsx/drawing/axis.rb @@ -165,7 +165,10 @@ module Axlsx end str << '' @title.to_xml_string(str) unless @title == nil - str << ('') + # Need to set sourceLinked to 0 if we're setting a format code on this row + # otherwise it will never take, as it will always prefer the 'General' formatting + # of the cells themselves + str << ('') str << '' str << '' str << ('') -- cgit v1.2.3