diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/data_validation.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/axlsx/workbook/worksheet/data_validation.rb b/lib/axlsx/workbook/worksheet/data_validation.rb index a84ab84d..a9e7ea9f 100644 --- a/lib/axlsx/workbook/worksheet/data_validation.rb +++ b/lib/axlsx/workbook/worksheet/data_validation.rb @@ -254,17 +254,15 @@ module Axlsx attributes = [:allowBlank, :error, :errorStyle, :errorTitle, :prompt, :promptTitle, :showErrorMessage, :showInputMessage, :sqref, :type] if [:whole, :decimal, :data, :time, :date, :textLength].include?(@type) - attributes << [:operator, :formula1] - attributes << [:formula2] if [:between, :notBetween].include?(@operator) + attributes << :operator << :formula1 + attributes << :formula2 if [:between, :notBetween].include?(@operator) elsif @type == :list - attributes << [:showDropDown, :formula1] + attributes << :showDropDown << :formula1 elsif @type == :custom - attributes << [:formula1] - else - attributes = [] + attributes << :formula1 end - attributes.flatten! + attributes end end end |
