You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
796 B
18 lines
796 B
- key = @excel_data[:key] || 'excel.columns'
|
|
%table
|
|
%thead
|
|
%tr
|
|
- @excel_data[:columns].each do |column|
|
|
%th=_(@excel_data[:keys][column].present? ? @excel_data[:keys][column] : "#{key}.#{column.to_s}")
|
|
%tbody
|
|
- @excel_data[:data].each do |row|
|
|
%tr
|
|
- @excel_data[:columns].each do |column|
|
|
%td{class: @excel_data[:column_types][column].present? ? @excel_data[:column_types][column].to_s : nil}=_!row[column]
|
|
|
|
- format_xls 'table' do
|
|
- workbook use_autowidth: true
|
|
- format bg_color: '333333'
|
|
- format 'td', font_name: 'Calibri', bg_color: 'ffffff', fg_color: '333333'
|
|
- format 'th', font_name: 'Calibri', b: true, bg_color: '333333', fg_color: 'ffffff'
|
|
- format 'td.date', num_fmt: 22, font_name: 'Courier New', sz: 10
|
|
|