forgeplus/app/views/issues/index.xlsx.axlsx

13 lines
696 B
Plaintext

wb = xlsx_package.workbook
wb.styles do |s|
sz_all = s.add_style :border => { :style => :thin, :color =>"000000" },:alignment => {wrap_text: true,:horizontal => :center, :vertical => :center}
blue_cell = s.add_style :bg_color => "FAEBDC", :sz => 10,:height => 20,:b => true, :border => { :style => :thin, :color =>"000000" },:alignment => {wrap_text: true,:horizontal => :center,:vertical => :center}
wb.add_worksheet(:name => "issues列表") do |sheet|
sheet.add_row table_columns, :style => blue_cell, height: 30
sheet.column_info.first.width = 12
issues.each do |user|
sheet.add_row user, :style => sz_all #用户id
end #each_widh_index
end #add_worksheet
end