Commit 08348a6f by Ivan Lan

导出宽度类型保护

parent 8b904f9a
......@@ -115,7 +115,7 @@ module TalltyImportExport
end
end
end
sheet.column_widths(*headers.map{|header| header[:width].to_f || @width})
sheet.column_widths(*headers.map{|header| (header[:width] || @width).to_f})
end
end
......@@ -123,7 +123,7 @@ module TalltyImportExport
options = options.with_indifferent_access
@row_height ||= options.delete(:row_height) || 35
@width ||= options.delete(:width) || 20
@width ||= (options.delete(:width) || 20).to_f
@filename ||= options.delete(:filename)
@group_by ||= options.delete(:group_by)
@group_where = "#{@group_by}_eq" if @group_by.present?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment