try setting the format of the header over a longer part of the header row

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@1065 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
t.felgentreff 15 years ago
parent 9f29ab1aed
commit ac63175a4a
  1. 2
      lib/xls_report/spreadsheet_builder.rb

@ -84,7 +84,7 @@ class SpreadsheetBuilder
# optional parameter. The format is automatically set to bold font # optional parameter. The format is automatically set to bold font
def add_headers(arr, idx = 1) def add_headers(arr, idx = 1)
header_format = Spreadsheet::Format.new(:weight => :bold) header_format = Spreadsheet::Format.new(:weight => :bold)
arr.size.times { |i| @sheet.row(idx).set_format(i, header_format) } (arr.size + 1).times { |i| @sheet.row(idx).set_format(i, header_format) }
idx = [idx, 1].max idx = [idx, 1].max
add_row(arr, idx) add_row(arr, idx)
end end

Loading…
Cancel
Save