Added data to excel sheet
This commit is contained in:
@@ -8,13 +8,14 @@
|
||||
- @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].to_s : nil}
|
||||
- if row[column].present?
|
||||
=_!row[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', 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
|
||||
- format 'td.date', num_fmt: 22, font_name: 'Courier New', sz: 10, bg_color: 'ffffff', fg_color: '333333'
|
||||
- format 'td.date.day', num_fmt: 14, font_name: 'Courier New', sz: 10, bg_color: 'ffffff', fg_color: '333333'
|
||||
- format 'td.money', num_fmt: 2, font_name: 'Courier New', sz: 10, bg_color: 'ffffff', fg_color: '333333'
|
||||
- format 'td.bold', font_name: 'Calibri', bg_color: 'ffffff', fg_color: '333333', b: true
|
||||
|
||||
Reference in New Issue
Block a user