lib/axlsx/workbook/worksheet/row.rb in axlsx-1.0.10 vs lib/axlsx/workbook/worksheet/row.rb in axlsx-1.0.11

- old
+ new

@@ -91,14 +91,16 @@ # @option options [Array, Symbol] types # @option options [Array, Integer] style def array_to_cells(values, options={}) values = values DataTypeValidator.validate 'Row.array_to_cells', Array, values - types, style = options[:types], options[:style] + types, style = options.delete(:types), options.delete(:style) values.each_with_index do |value, index| cell_style = style.is_a?(Array) ? style[index] : style + options[:style] = cell_style if cell_style cell_type = types.is_a?(Array)? types[index] : types - Cell.new(self, value, :style=>cell_style, :type=>cell_type) + options[:type] = cell_type if cell_type + Cell.new(self, value, options) end end end end