From b2122aac37250fd9a24fc4577560761327ecdced Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Hühne Date: Thu, 24 May 2012 11:13:26 +0200 Subject: Valid attributes optimization --- lib/axlsx/workbook/worksheet/data_validation.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/axlsx/workbook/worksheet/data_validation.rb b/lib/axlsx/workbook/worksheet/data_validation.rb index 2591c669..f7622026 100644 --- a/lib/axlsx/workbook/worksheet/data_validation.rb +++ b/lib/axlsx/workbook/worksheet/data_validation.rb @@ -229,7 +229,8 @@ module Axlsx attributes = [:allowBlank, :error, :errorStyle, :errorTitle, :prompt, :promptTitle, :showErrorMessage, :showInputMessage, :sqref, :type ] if [:whole, :decimal, :data, :time, :textLength].include?(@type) - attributes << [:operator, :formula1, :formula2] + attributes << [:operator, :formula1] + attributes << [:formula2] if [:between, :notBetween].include?(@operator) elsif @type == :list attributes << [:showDropDown, :formula1] elsif @type == :custom -- cgit v1.2.3