diff options
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 1 | ||||
| -rw-r--r-- | test/stylesheet/tc_styles.rb | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index 955a8b1e..1c59bcfd 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -230,6 +230,7 @@ module Axlsx if options[:alignment] xf.alignment = CellAlignment.new(options[:alignment]) + xf.applyAlignment = true end if applyProtection diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb index df180b61..1b7365b2 100644 --- a/test/stylesheet/tc_styles.rb +++ b/test/stylesheet/tc_styles.rb @@ -49,8 +49,8 @@ class TestStyles < Test::Unit::TestCase assert_equal(xf.applyProtection, 1, "protection applied") assert_equal(xf.applyBorder, true, "border applied") - assert_equal(xf.applyNumberFormat, true, "border applied") - + assert_equal(xf.applyNumberFormat, true, "number format applied") + assert_equal(xf.applyAlignment, true, "alignment applied") end end |
