- 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].present? && @excel_data[:column_types][column].present?) ? @excel_data[:column_types][column] : nil}=(row[column].present? ? (_!row[column]) : '') - format_xls 'table' do - workbook use_autowidth: true - format bg_color: '333333' - format 'td', font_name: 'Calibri', fg_color: '333333' - format 'th', font_name: 'Calibri', b: true, bg_color: '333333', fg_color: 'ffffff' - format 'td.datetime', num_fmt: 22, font_name: 'Courier New', sz: 10, fg_color: '333333' - format 'td.date.day', num_fmt: 14, font_name: 'Courier New', sz: 10, fg_color: '333333' - format 'td.money', num_fmt: 2, font_name: 'Courier New', sz: 10, fg_color: '333333' - format 'td.bold', font_name: 'Calibri', fg_color: '333333', b: true