Sha256: 0fa12f015fa1a08433d8c51d5dc0d0a87e3150f67acf4106dd1bc92a8dd18138
Contents?: true
Size: 762 Bytes
Versions: 10
Compression:
Stored size: 762 Bytes
Contents
wb = sheet.workbook styles = {} unless defined?(styles) styles[:bold] ||= wb.styles.add_style :b => true styles[:title] ||= wb.styles.add_style :sz => 14, :alignment => { :horizontal => :center}, :b => true styles[:subtitle] ||= wb.styles.add_style :sz => 12, :alignment => { :horizontal => :center}, :b => true columns ||= 8 subtitle ||= '' sheet.add_row ["Company Name, Address"] + ['']*(columns-3) + [Date.today().to_s, Time.now().strftime("%I:%M")], :style => styles[:bold] sheet.add_row [' '] * columns sheet.add_row [title], :style => styles[:title] sheet.add_row [subtitle], :style => styles[:subtitle] sheet.merge_cells("A1:#{to_xls_col(columns-3)}1") (2..4).each {|i| sheet.merge_cells("A#{i}:#{to_xls_col(columns-1)}#{i}") }
Version data entries
10 entries across 5 versions & 1 rubygems