def array_to_cells(values, options={})
      DataTypeValidator.validate :array_to_cells, Array, values
      types, style, formula_values = options.delete(:types), options.delete(:style), options.delete(:formula_values)
      values.each_with_index do |value, index|
        options[:style] = style.is_a?(Array) ? style[index] : style if style
        options[:type] = types.is_a?(Array) ? types[index] : types if types
        options[:formula_value] = formula_values[index] if formula_values.is_a?(Array)

        self[index] = Cell.new(self, value, options)
      end
    end
def array_to_cells(values, options={})
      DataTypeValidator.validate :array_to_cells, Array, values
      types, style, formula_values = options.delete(:types), options.delete(:style), options.delete(:formula_values)
      values.each_with_index do |value, index|
        options[:style] = style.is_a?(Array) ? style[index] : style if style
        options[:type] = types.is_a?(Array) ? types[index] : types if types
        options[:formula_value] = formula_values[index] if formula_values.is_a?(Array)

        self[index] = Cell.new(self, value, options)
      end
    end
Converts values, types, and style options into cells and associates them with this row.
 A new cell is created for each item in the values array.
 If value option is defined and is a symbol it is applied to all the cells created.
 If the value option is an array, cell types are applied by index for each cell
 If the style option is defined and is an Integer, it is applied to all cells created.
 If the style option is an array, style is applied by index for each cell.
 @option options [Array] values
 @option options [Array, Symbol] types
 @option options [Array, Integer] style