|
|
|
@ -27,14 +27,14 @@ wb.styles do |s|
|
|
|
|
|
sheet_first = sheet.rows.first #第一行
|
|
|
|
|
sheet_second = sheet.rows.second #第二行
|
|
|
|
|
work_head_title = %w(实训作业 普通作业 分组作业 毕设任务 试卷)
|
|
|
|
|
(0..(sheet_length-1)).each do |i|
|
|
|
|
|
if i <= 6 || i == sheet_length-1
|
|
|
|
|
(0..sheet_length).each do |i|
|
|
|
|
|
if i <= 7 || i == sheet_length
|
|
|
|
|
sheet_first.cells[i].value = sheet_title[i]
|
|
|
|
|
else
|
|
|
|
|
sheet_second.cells[i].value = sheet_title[i]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
st_col = 7
|
|
|
|
|
st_col = 8
|
|
|
|
|
sheet_title_counts.each_with_index do |c,index|
|
|
|
|
|
end_col = (st_col + c - 1)
|
|
|
|
|
sheet.merge_cells sheet_first.cells[(st_col..end_col)]
|
|
|
|
|