diff options
| author | Jan-Hendrik Hühne <[email protected]> | 2012-05-24 11:13:26 +0200 |
|---|---|---|
| committer | Jan-Hendrik Hühne <[email protected]> | 2012-05-24 11:13:26 +0200 |
| commit | b2122aac37250fd9a24fc4577560761327ecdced (patch) | |
| tree | f24eaa63a58fd140f4ea46899b36bc3304a2fc91 | |
| parent | 395bb937970e167fe93ce51650c5d2ff79e4e310 (diff) | |
| download | caxlsx-b2122aac37250fd9a24fc4577560761327ecdced.tar.gz caxlsx-b2122aac37250fd9a24fc4577560761327ecdced.zip | |
Valid attributes optimization
| -rw-r--r-- | lib/axlsx/workbook/worksheet/data_validation.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
