Sha256: d2d87935b1776d4c31e184a163f5f505570e67e3e5c4abb53fe02d255e5c787b
Contents?: true
Size: 560 Bytes
Versions: 9
Compression:
Stored size: 560 Bytes
Contents
wb = xlsx_package.workbook header_style = Comable::Config.export_xlsx_header_style header_style_handle = wb.styles.add_style(header_style) if header_style style = Comable::Config.export_xlsx_style style_handle = wb.styles.add_style(style) if style wb.add_worksheet(name: records.klass.model_name.human) do |sheet| sheet.add_row records.klass.new.to_comma_headers sheet.row_style 0, header_style_handle if header_style_handle records.each do |record| sheet.add_row record.to_comma end sheet.row_style (1..-1), style_handle if style_handle end
Version data entries
9 entries across 9 versions & 2 rubygems