Commit 6d2660f9 by liyijie

header format can be nil

parent fc84f1d6
......@@ -84,7 +84,7 @@ module TalltyImportExport
records.send(each_method).with_index do |record, index|
row = []
headers.each{ |header| row.push(handle_data(record, header, index)) }
sheet.add_row row, style: title3, height: @row_height, types: headers.map{|header| header[:format].to_sym}
sheet.add_row row, style: title3, height: @row_height, types: headers.map{|header| header[:format]&.to_sym}
end
sheet.column_widths(*headers.map{|header| header[:width] || @width})
end
......
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