def set_properties(params)
      # Ignore if no args were passed.
      return -1 if params.empty?

      # List of valid input parameters.
      valid = {
        :title       => 1,
        :subject     => 1,
        :author      => 1,
        :keywords    => 1,
        :comments    => 1,
        :last_author => 1,
        :created     => 1,
        :category    => 1,
        :manager     => 1,
        :company     => 1,
        :status      => 1
      }

      # Check for valid input parameters.
      params.each_key do |key|
        return -1 unless valid.has_key?(key)
      end

      # Set the creation time unless specified by the user.
      params[:created] = @local_time unless params.has_key?(:created)

      @doc_properties = params.dup
    end
def set_properties(params)
      # Ignore if no args were passed.
      return -1 if params.empty?

      # List of valid input parameters.
      valid = {
        :title       => 1,
        :subject     => 1,
        :author      => 1,
        :keywords    => 1,
        :comments    => 1,
        :last_author => 1,
        :created     => 1,
        :category    => 1,
        :manager     => 1,
        :company     => 1,
        :status      => 1
      }

      # Check for valid input parameters.
      params.each_key do |key|
        return -1 unless valid.has_key?(key)
      end

      # Set the creation time unless specified by the user.
      params[:created] = @local_time unless params.has_key?(:created)

      @doc_properties = params.dup
    end
The set_properties method can be used to set the document properties
 of the Excel file created by WriteXLSX. These properties are visible
 when you use the Office Button -> Prepare -> Properties option in Excel
 and are also available to external applications that read or index windows
 files.

 The properties should be passed in hash format as follows:

     workbook.set_properties(
       :title    => 'This is an example spreadsheet',
       :author   => 'Hideo NAKAMURA',
       :comments => 'Created with Ruby and WriteXLSX'
     )

 The properties that can be set are:

     :title
     :subject
     :author
     :manager
     :company
     :category
     :keywords
     :comments
     :status

 See also the properties.rb program in the examples directory
 of the distro.