Sha256: 5e0d651944024ff69388753d4a8f55aedcf01ac44b9ef457abd518538b5aaa07

Contents?: true

Size: 1.81 KB

Versions: 10

Compression:

Stored size: 1.81 KB

Contents

require 'rubyXL/objects/ooxml_object'
require 'rubyXL/objects/simple_types'
require 'rubyXL/objects/formula'

module RubyXL
  # http://www.datypic.com/sc/ooxml/e-ssml_dataValidation-1.html
  class DataValidation < OOXMLObject
    define_attribute(:type,             RubyXL::ST_DataValidationType,       :default => 'none')
    define_attribute(:errorStyle,       RubyXL::ST_DataValidationErrorStyle, :default => 'stop')
    define_attribute(:imeMode,          RubyXL::ST_DataValidationImeMode,    :default => 'noControl')
    define_attribute(:operator,         RubyXL::ST_DataValidationOperator,   :default => 'between')
    define_attribute(:allowBlank,       :bool, :default => false)
    # Documentation lies. This property should have been called "HIDE dropdown",
    #   since that's what happens when it is set to true.
    define_attribute(:showDropDown,     :bool, :default => false)
    define_attribute(:showInputMessage, :bool, :default => false)
    define_attribute(:showErrorMessage, :bool, :default => false)
    define_attribute(:errorTitle,       :string)
    define_attribute(:error,            :string)
    define_attribute(:promptTitle,      :string)
    define_attribute(:prompt,           :string)
    define_attribute(:sqref,            :sqref, :required => true)

    define_child_node(RubyXL::Formula, :node_name => :formula1)
    define_child_node(RubyXL::Formula, :node_name => :formula2)
    define_element_name 'dataValidation'
  end

  # http://www.datypic.com/sc/ooxml/e-ssml_dataValidations-1.html
  class DataValidations < OOXMLContainerObject
    define_attribute(:disablePrompts, :bool, :default => false)
    define_attribute(:xWindow,        :int)
    define_attribute(:yWindow,        :int)
    define_child_node(RubyXL::DataValidation, :collection => :with_count)
    define_element_name 'dataValidations'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubyXL-3.4.33 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.32 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.31 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.30 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.29 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.28 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.27 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.26 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.25 lib/rubyXL/objects/data_validation.rb
rubyXL-3.4.24 lib/rubyXL/objects/data_validation.rb